Commit graph

12222 commits

Author SHA1 Message Date
Jack Wilsdon
4c22c1bbea Update mediafile to 0.13.0 2024-11-03 20:31:10 +00:00
Šarūnas Nejus
fa10dcf11a
Fix docs build (#5492)
Seems like readthedocs build expects docs dependencies to be available
as an extra, see one of the failing builds:
https://app.readthedocs.org/projects/beets/builds/26079213/.

You can see this has been failing due to missing 'pydata_sphinx_theme'
which is one of our dependencies:

```
    raise ThemeError(__('no theme named %r found (missing theme.toml?)') % name)
    sphinx.errors.ThemeError: no theme named 'pydata_sphinx_theme' found (missing theme.toml?)
    Theme error:
    no theme named 'pydata_sphinx_theme' found (missing theme.toml?)
```
2024-10-31 00:50:01 +00:00
Šarūnas Nejus
6180ce1973
Revert "ci: Replace pull_request with pull_request_target"
This was a very bad idea since this made CI operate within the context
of the *base* branch, which meant that the tests were testing code in
the `master` branch instead of the branch that was to be merged!
2024-10-30 12:27:44 +00:00
Šarūnas Nejus
69dbfd9868
Fix lints
These seem to have managed to escape the CI checks since the previously
merged PR was based on master commit which did not include the checks.
2024-10-30 12:13:30 +00:00
Šarūnas Nejus
826783d4c3
Define docs dependencies as an extra
Seems like readthedocs build expects docs dependencies to be available
as an extra, see one of the failing builds: https://app.readthedocs.org/projects/beets/builds/26079213/.

You can see this has been failing due to missing 'pydata_sphinx_theme':

    raise ThemeError(__('no theme named %r found (missing theme.toml?)') % name)
    sphinx.errors.ThemeError: no theme named 'pydata_sphinx_theme' found (missing theme.toml?)
    Theme error:
    no theme named 'pydata_sphinx_theme' found (missing theme.toml?)
2024-10-30 11:55:55 +00:00
Mateusz Soszyński
f7a34f1703
turns out single genres wasnt enough yet 2024-10-27 03:47:35 +01:00
Mateusz Soszyński
56d183300e
change to genres 2024-10-27 03:41:41 +01:00
Šarūnas Nejus
f0f87cc8ca
Fix the no_convert option of the convert plugin stopping conversion when there is only a partial match. (#5376)
I was running the `convert` plugin with the following config:

```
no_convert: samplerate:..48000 bitdepth:..16
```

but anything that was 24/48 was also not being converted, this was due
to the code returning `False` for `should_transcode` if any part of the
query matches, rather than considering the whole query. This meant that
`bitdepth:...16` was being ignored.

I have changed this so the `no_convert` value is considered as one
query.
2024-10-27 01:30:21 +01:00
Joseph Bushell
4b78abd939 create seperate in_no_convert function, update tests 2024-10-26 19:09:56 +01:00
Joseph Bushell
2e6e1809e3 Update docs/changelog.rst
Co-authored-by: Šarūnas Nejus <snejus@protonmail.com>
2024-10-26 18:18:06 +01:00
Joseph Bushell
bba11be9f7 update test assertions 2024-10-26 18:17:39 +01:00
Joseph Bushell
a73919b4ba add test for no_convert when using OR query 2024-10-26 18:17:27 +01:00
Joseph Bushell
d1c88bbd25 consider value of no_convert as one query rather than splitting 2024-10-26 18:17:00 +01:00
Alok Saboo
c49de7afe6 Update changelog.rst 2024-10-25 10:53:26 -04:00
Alok Saboo
93aa569e3f Improve ListenBrainz error handling and simplify playlist handling 2024-10-25 10:06:54 -04:00
RollingStar
d37cf299c5
Merge branch 'beetbox:master' into patch-6 2024-10-20 14:25:03 -04:00
RollingStar
7aa1b0f069
Merge branch 'beetbox:master' into arm-info 2024-10-20 14:24:01 -04:00
Šarūnas Nejus
f8b10712e6
Make coverage token available in forks (#5479)
This fixes coverage submission in CI, which has been failing for PRs
submitted from forks.
2024-10-20 17:37:54 +01:00
Šarūnas Nejus
9023ff5fd4
ci: Replace pull_request with pull_request_target
This makes the coverage token available in forks.
2024-10-20 17:05:44 +01:00
RollingStar
fdb678cd1a
bitesize to good first issue: Update changelog.rst 2024-10-20 11:49:41 -04:00
Nicholas Boyd Isacsson
8e0558b804 Apply substitute rules in sequence 2024-10-16 16:36:36 +02:00
Nicholas Boyd Isacsson
19eb729db3 Refactor tests to make 2024-10-16 16:35:39 +02:00
Nicholas Boyd Isacsson
617509262e Fix test helper reordering plugin configuration 2024-10-16 16:21:32 +02:00
Šarūnas Nejus
6f41872a26
Remove unused logic from beets.test and exclude it from coverage
Fun fact: it was the coverage data that revealed that this logic is not
used.
2024-10-16 12:38:21 +01:00
Šarūnas Nejus
41907a96a6
Remove _common.album and use Album instead 2024-10-16 12:37:22 +01:00
Šarūnas Nejus
d161111342
test helpers: remove redundant _get_item_count
It always returns 1.
2024-10-16 12:33:17 +01:00
Šarūnas Nejus
2681c83c5b
Remove redundant generate_album_info and generate_track_info functions
These functions were used to generate mock data for tests but have been
replaced with direct instantiation of AlbumInfo and TrackInfo objects.
This change simplifies the test code and removes unnecessary helper
functions.
2024-10-16 06:39:30 +01:00
Nicholas Boyd Isacsson
ffdc3f73ab Revert configuration format changes 2024-10-14 22:54:38 +02:00
RollingStar
97b785e31c
ARM install instructions 2024-10-13 12:31:37 -04:00
Šarūnas Nejus
65d78cb65d
Lyrics: Fetch lyrics directly from Tekstowo (#5457)
Fixes #5456.

This pull request updates the `tekstowo` backend in the `lyrics` plugin
to fetch lyrics directly from the Tekstowo.pl website. Recent updates to
their website made the previous search-based approach unworkable.

## Changes
1. **Refactor Backend Classes:**
- Introduced a new `DirectBackend` class for backends that fetch lyrics
directly.
- Updated `MusiXmatch` and `Tekstowo` classes to inherit from
`DirectBackend`.

2. **Encoding and URL Building:**
- Added `encode` and `build_url` methods to `DirectBackend` for URL
encoding and construction.
   - Replaced our custom encoding functionality with `unidecode`.

3. **Tekstowo Backend:**
- Added encoding logic, which converts artist and title to the format
used by tekstowo.
- Removed the search functionality (`parse_search_results`), its test
and related search html files.
   - Updated `artist` and `title` checks from `extract_lyrics`.
2024-10-12 22:52:50 +01:00
Nicholas Boyd Isacsson
48c7435780 Fix code-blocks 2024-10-12 16:20:25 +02:00
Nicholas Boyd Isacsson
195644fc46 Refactor according to review comments 2024-10-12 15:34:05 +02:00
Šarūnas Nejus
d3955bac65
Update Tekstowo backend to fetch lyrics directly
- Refactored Tekstowo backend to fetch lyrics directly from song pages.
- Added `encode` method to convert artist and title to their URL format,
  where non-alphanumeric characters are replaced with underscores.
- Removed the now redundant search functionality and associated tests.
- Simplified `extract_lyrics` method to directly parse lyrics without
  any checks.
2024-10-12 02:14:18 +01:00
Šarūnas Nejus
9d2b34d457
Create DirectBackend interface for MusiXmatch and Tekstowo
And replace some of the encoding logic by unidecode.
2024-10-12 01:29:55 +01:00
Nicholas Boyd Isacsson
9bc586d7ea Replace Py3.10+ pattern matching with isinstance 2024-10-05 15:51:41 +02:00
Nicholas Boyd Isacsson
913d51af5c Preserve rule order in substitute configuration 2024-10-05 15:51:41 +02:00
Nicholas Boyd Isacsson
876dcb9bee Fix substitute test formatting 2024-10-05 15:51:41 +02:00
Nicholas Boyd Isacsson
16ac231f7f Refactor substitute tests 2024-10-05 15:51:41 +02:00
Nicholas Boyd Isacsson
81b79a08c1 Add test cases for substitute plugin 2024-10-05 15:51:41 +02:00
Nicholas Boyd Isacsson
65096c425a Update changelog and documentation 2024-10-05 15:51:41 +02:00
Nicholas Boyd Isacsson
9680d8f3f5 Rename variables 2024-10-05 15:51:41 +02:00
Nicholas Boyd Isacsson
7b5d818603 Use a regex substitution in substitute 2024-10-05 15:51:41 +02:00
Nicholas Boyd Isacsson
e613a57ca4 Use case insensitive regex for substitute 2024-10-05 15:51:41 +02:00
Šarūnas Nejus
03f1205629
ftintitle: Fix false positives in "feat. X" detection in title (#5442)
Fixes #5441 

This small change explicitly passes the `for_artist` keyword to the
`plugins.feat_tokens` function that constructs the regex for matching
existing "feat. X" parts in song titles.
Previously, it was not passed and set to the default (`True`), which
caused using the pattern intended for the artist field to also be used
for the title field.
This caused some false positives as shown in #5441
2024-10-02 00:19:38 +01:00
Karl Besser
37879d0b18 Remove redundant unit tests for ftintitle plugin
Remove redundant unit tests for the `ftintitle.cotains_feat` function
2024-10-01 15:55:38 -05:00
Karl Besser
669307c91c Update ftintitle.contains_feat unit tests
Since the `for_artist` keyword has been removed from
`ftintitle.contains_feat`, the unit tests need to be updated.
This includes the deletion of the test cases that test the
`for_artist=True` delimiters.
2024-09-30 10:28:23 -05:00
Karl Besser
ed627c031c Hardcode for_artist keyword in ftintitle plugin
Remove the optional `for_artist` keyword in the
`ftintitle.contains_feat` function and hardcode it to False, since it is
always used like this in the ftintitle plugin.
2024-09-30 10:24:09 -05:00
Karl Besser
71b5a9651c Add reference to ftintitle plugin in changelog
Add references to the ftintitle plugin for the bug fixes #5441 and #5436
that are related to this plugin.
2024-09-30 10:20:29 -05:00
Karl-Ludwig Besser
ab86b2d1e8
Merge branch 'beetbox:master' into fix_false_positive_ftintitle 2024-09-30 10:17:19 -05:00
Andrew Rogl
04ee04150a
Reworked #4709 after latest release (#5447)
Fixes #4709 SQL use of Double Quoted Strings.
2024-09-30 10:28:15 +01:00