Commit graph

12072 commits

Author SHA1 Message Date
Šarūnas Nejus
0780bf386c
Release: make sure release artefacts are present for the tagging job 2024-11-22 02:05:36 +00:00
Šarūnas Nejus
cf3acec555
Release: temporarily ignore errors with bumping version and pypi push 2024-11-22 01:58:26 +00:00
Šarūnas Nejus
4a5b9a26f1
Release: fix github-tag-action version 2024-11-22 01:57:10 +00:00
snejus
bc16ed1817 Increment version to 2.1.0 2024-11-22 01:50:28 +00:00
Šarūnas Nejus
7488c94d38
Release: try checking out the master branch 2024-11-22 01:49:46 +00:00
Šarūnas Nejus
aa0db049a5
Release: fix bumping the version in the changelog 2024-11-22 01:32:15 +00:00
Šarūnas Nejus
c6c4afa543
Release: Make sure to checkout the new commit with bumped version 2024-11-22 01:22:47 +00:00
Šarūnas Nejus
ea6ddde351
Fix changelog retrieval workflow step 2024-11-22 00:59:50 +00:00
Šarūnas Nejus
6a7efdf53d
Update mediafile to 0.13.0 (#5494)
Fixes #5420.
2024-11-15 07:07:29 +00:00
Šarūnas Nejus
de171f03fc
Test helpers: Remove unneeded data generation abstractions (#5463)
This PR refactors the test codebase by removing redundant functions and
simplifying item and album creation. Key changes include:

- Removed redundant `_item_ident` index tracker from `_common.py`.
- Removed `album` function from `_common.py` replacing it with direct
`library.Album` invocations.
- Removed `generate_album_info` and `generate_track_info` functions,
replacing them directly with `TrackInfo` and `AlbumInfo`.
- Updated `setup.cfg` to exclude test helper files from coverage
reports.
- Adjusted the tests regarding the changes, and simplified
`test_mbsync.py`.
2024-11-13 14:16:15 +00:00
Šarūnas Nejus
7e9f7fc8de
Improve ListenBrainz error handling and simplify playlist handling (#5480)
Fixes #5459
2024-11-13 14:11:53 +00:00
Šarūnas Nejus
9345103bd4
Fix the `TypeError when import.set_fields` is provided non-string values (#5495)
Fixes #4840 by converting input values to strings before they are used.
Modifies the test cases for ``set_fields`` to appropriately test this
behavior.
2024-11-11 16:52:25 +00:00
adamharder3
a98cf47c06
Update docs/changelog.rst
Co-authored-by: Šarūnas Nejus <snejus@protonmail.com>
2024-11-11 10:43:31 -05:00
Alok Saboo
b9c6ee208e lint error 2024-11-10 20:27:41 -05:00
Alok Saboo
35c6e13255 Update line length 2024-11-10 20:25:28 -05:00
Alok Saboo
3586669dd5 Merge branch 'lb_error' of https://github.com/arsaboo/beets into lb_error 2024-11-10 20:24:36 -05:00
Alok Saboo
24115167d3 Merge remote-tracking branch 'upstream/master' into lb_error 2024-11-10 20:23:34 -05:00
Alok Saboo
c1b4b58e65
Update beetsplug/listenbrainz.py
Co-authored-by: Šarūnas Nejus <snejus@protonmail.com>
2024-11-10 20:23:11 -05:00
Adam Harder
8448d8b4be changelog 2024-11-06 23:27:18 -05:00
Adam Harder
507c91765d remove debugging code 2024-11-06 23:17:38 -05:00
Adam Harder
d6ac687de1 fix #4840 and add to test case 2024-11-06 23:14:47 -05:00
Jack Wilsdon
5a3cace84e Use correct JPEG header in tests 2024-11-03 20:46:29 +00:00
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
Š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
Š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
Š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
Š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
Š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
Š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