Commit Graph

842 Commits

Author SHA1 Message Date
f1nn
0d65a46bbc lyrics: add lrcmux backend 2026-07-15 16:12:21 +02:00
J0J0 Todos
c51f5755f3 lastgenre: Whitelist/Tree fixes; Default aliases
- Fixes some inconsistencies in spelling in the data files we ship with
  the plugin as well as adds some new genres to both files that seem to
  be returned often by last.fm.
  - For some changes the default aliases feature helps to streamline
    inconsistencies that come from last.fm already.
- The default aliases file that ships with beets
  - Tests fixes that prove that most of the alias normalization patterns
    work as they are supposed to.

Co-authored-by: Šarūnas Nejus <snejus@protonmail.com>
2026-07-15 16:04:51 +02:00
J0J0 Todos
3ce8c9bbf5 lastgenre: Tests for _filter_valid helper,
even though it's indirectly tested via resolve_genres tests and
elsewhere, it makes sense to keep them to help with future refactoring.
2026-07-15 16:04:51 +02:00
J0J0 Todos
1674b5e7f9 lastgenre: Tests for genre alias normalization
Co-authored-by: Šarūnas Nejus <snejus@protonmail.com>
2026-07-15 16:04:51 +02:00
AleksZyro
a6d576d039 Preserve null artpath in edit 2026-07-15 14:30:42 +01:00
Sebastian Cao
7d4f160c36 missing: honor -f/--format in album mode 2026-07-15 14:31:58 +08:00
AleksZyro
04f2c3e794 Improve subsonicupdate server error 2026-07-14 20:09:56 +02:00
Sebastian Mohr
19f944698d rewrite: PluginTestCase -> PluginTestHelper 2026-07-14 17:24:17 +02:00
Sebastian Mohr
5364644238 replace: PluginTestCase -> PluginTestHelper 2026-07-14 17:24:17 +02:00
Sebastian Mohr
9f75017d72 mpdstats: PluginTestCase -> PluginTestHelper 2026-07-14 17:24:17 +02:00
Sebastian Mohr
a06c4b4736 inline: PluginTestCase -> PluginTestHelper 2026-07-14 17:24:17 +02:00
Sebastian Mohr
ca2acfc28a tidal: PluginTestCase -> PluginTestHelper 2026-07-14 17:24:17 +02:00
Sebastian Mohr
2b90679100 advancedrewrite: PluginTestCase -> PluginTestHelper 2026-07-14 17:24:17 +02:00
Sebastian Mohr
9f75e2b211 acousticbrainz: Removed unittest.TestCase 2026-07-14 17:24:17 +02:00
Sebastian Mohr
d19e36a0a1 substitute: PluginTestCase -> PluginTestHelper 2026-07-14 17:24:17 +02:00
Sebastian Mohr
9616065591 the: Removed unittest.TestCase 2026-07-14 17:24:17 +02:00
Sebastian Mohr
c04bae3c8f ihate: Removed unittest.TestCase 2026-07-14 17:24:17 +02:00
Šarūnas Nejus
e671c375f1 Make music_dir a Path, simplify setup 2026-07-14 14:36:12 +01:00
Šarūnas Nejus
364d027371 Define attribute for item paths 2026-07-14 14:36:12 +01:00
Šarūnas Nejus
70174db929 Write playlists inside setUp 2026-07-14 14:36:12 +01:00
Šarūnas Nejus
ea12df17a9 Define write_relative_playlist 2026-07-14 14:36:12 +01:00
Šarūnas Nejus
6586ea82cb Define write_absolute_playlist 2026-07-14 14:36:12 +01:00
Šarūnas Nejus
f8ed00386e Define absolute_playlist_path, relative_playlist_path 2026-07-14 14:36:12 +01:00
Alok Saboo
01c2943e76 remove redundant test 2026-07-13 12:37:07 -04:00
Alok Saboo
3ce00617e9 switch the logic ot strip item-only fixed fields 2026-07-13 12:29:55 -04:00
Alok Saboo
58fb167750 Merge branch 'master' into edit 2026-07-13 08:47:53 -04:00
Ross Williams
c2fc7a8a57 test: fix requests_mock setup in test_art.py
`requests_mock` was configured with a fallback matcher to return an
exception on any request. The intent was to have tests fail if any
requests are attempted in tests without matching mocks. This is the
default behavior of `requests_mock`, so no fallback matcher is
necessary. The side-effect of the fallback matcher, removed by this
commit, was that 1) the `NoMockAddress` exception was raised to the
function under test rather than to the test harness and 2) the
`NoMockAddress` exception was not able to be constructed because the
`exc` parameter to `requests_mock.register_uri` does not support
exceptions that require arguments. This behavior is visible in the
following log snippet, taken from an incorrectly-passing test:

```
DEBUG    beets.fetchart:logging.py:163 downloading image: https://images.amazon.com/images/P/xxxx.01.LZZZZZZZ.jpg
DEBUG    requests_mock.adapter:adapter.py:256 GET https://images.amazon.com/images/P/xxxx.01.LZZZZZZZ.jpg 200
DEBUG    beets.fetchart:logging.py:163 not a supported image: text/html
DEBUG    beets.fetchart:logging.py:163 downloading image: https://images.amazon.com/images/P/xxxx.02.LZZZZZZZ.jpg
DEBUG    beets.fetchart:logging.py:163 error fetching art: NoMockAddress.__init__() missing 1 required positional argument: 'request'
```

The test that emitted these logs passed because the `FetchArt` plugin is
written to handle exceptions raised by art sources, skipping and logging
an error. For the exception to cause a failing test, the default
behavior of `requests_mock` of raising an exception to the test harness
when no matching mock requests can be found must be allowed.

Signed-off-by: Ross Williams <ross@ross-williams.net>
2026-07-13 13:21:32 +01:00
Alok Saboo
7f45f51690 Merge branch 'master' into edit 2026-07-12 20:39:16 -04:00
Šarūnas Nejus
d9a1bde1c9 Add --no-keep-synced CLI option to lyrics
- Allow manual lyrics fetches to override keep_synced configuration for a single
  run.
2026-07-13 01:14:41 +01:00
Alok Saboo
aeaab7320d Merge branch 'master' into edit 2026-07-12 20:14:33 -04:00
Alok Saboo
210ca09637 ignore item-only fields configured in albumfields 2026-07-12 20:14:11 -04:00
Šarūnas Nejus
8020c07acf Track instrumental lyrics metadata
- Leave lyrics text empty when a backend reports an instrumental track and
  persist that state in lyrics_instrumental.
2026-07-13 01:07:59 +01:00
Alok Saboo
f91ba3a315 Merge branch 'master' into edit 2026-07-12 09:12:02 -04:00
Alok Saboo
55199bf365 harden edit-plugin id matching against duplicate ids and header reordering 2026-07-10 17:52:55 -04:00
Ross Williams
6afc0f282a test: add importer test for fetchart plugin
Test whether fetchart is run during the import phase and, specifically,
whether the `fetch_for_asis` setting is honored. Mock boundary is
between `FetchArtPlugin` and `ArtSource`, an already-existing internal
API boundary.
2026-07-10 22:19:44 +01:00
Ross Williams
77405266eb test: convert test_fetchart to TestHelper
Signed-off-by: Ross Williams <ross@ross-williams.net>
2026-07-10 22:15:39 +01:00
Alok Saboo
094e38e002 Merge remote-tracking branch 'upstream/master' into edit
# Conflicts:
#	docs/changelog.rst
2026-07-10 16:31:13 -04:00
Alok Saboo
855434792c refactor code to remove duplication 2026-07-10 08:27:24 -04:00
Alok Saboo
c30dd28238 address reviewer comment; match track to items by id 2026-07-10 08:27:24 -04:00
Alok Saboo
bf94ae66ef sync branch 2026-07-10 08:27:23 -04:00
Trey Turner
5d2280013a test(ftintitle): remove mostly redundant test_trackinfo_received_preserves_collaborative_artist_credit 2026-07-08 22:02:12 -05:00
Trey Turner
617bfd6a92 fix(ftintitle): remove singleton handling as out of scope 2026-07-08 21:53:00 -05:00
Trey Turner
6132297fa1 test(ftintitle): remove item_data["artist"] assertion from artist_credit test 2026-07-08 21:53:00 -05:00
Trey Turner
b88390fc32 refactor(ftintitle): abstract ft_in_info into ft_in_title 2026-07-08 21:52:52 -05:00
Trey Turner
5738a8a0f1 test(ftintitle): remove artist_credit tests 2026-07-08 21:10:48 -05:00
Trey Turner
9abe96355b fix(ftintitle): defer inclusion of artist_credit, review cleanup 2026-07-08 21:10:48 -05:00
Trey Turner
61f8c94e7f fix(hooks): remove cached property invalidation 2026-07-08 21:10:48 -05:00
Trey Turner
1160d31cfa feat(ftintitle): hook metadata events, fixing mbsync 2026-07-08 21:10:47 -05:00
Šarūnas Nejus
230bf19c7f Remove redundant test logic exposed by full coverage
- Removing the coverage omit configuration exposed unused branches, helpers, and
  fixtures across the test suite.
- Delete that redundant logic and simplify affected tests while preserving their
  behavior.
2026-07-07 15:57:35 +01:00
Šarūnas Nejus
7cf8896597 Make the global config fixture function-scoped 2026-07-03 21:21:19 +01:00