Commit Graph

43 Commits

Author SHA1 Message Date
Sebastian Mohr
830c14a5bb Added retry logic to TidalSession and added RequestHandler abstraction
to api layer.
2026-04-20 20:55:47 +02:00
Sebastian Mohr
cc943c3ccc Scafolded tidal source plugin:
- plugin functions currently unimplemented
- added authentication flow (pcke)
- added api layer to abstract communication with tidal (similar to spotify)
- added a general Request RateLimiter as I have seen that tidal will penalize
you pretty rough if you make more requests than expected.
2026-04-20 20:55:47 +02:00
Šarūnas Nejus
bff84bbd06 Refactor parsing label info 2026-04-18 17:31:49 +01:00
Šarūnas Nejus
cedf81eb22 Type musicbrainz fully 2026-04-12 16:21:30 +01:00
Šarūnas Nejus
9394f1b223 Normalize dashes to underscores in musicbrainz data fields 2026-04-12 16:21:30 +01:00
Alok Saboo
17ffd18b77 playcount: batch all store() calls in a single transaction
Each song.store() was opening and committing its own SQLite transaction.
With thousands of unique tracks the WAL grows and each successive write
becomes slower. Wrapping the loop in a single transaction makes writes
O(1) per item instead of progressively slower.
2026-04-08 09:59:41 -04:00
Alok Saboo
8c5c89a844 playcount: log progress every 250 tracks during processing 2026-04-08 09:02:51 -04:00
Šarūnas Nejus
db7c753ebe Update listenbrainz accordingly 2026-03-31 01:36:08 +01:00
Šarūnas Nejus
d7c9e268f9 Refactor process_tracks and add tests 2026-03-31 01:36:08 +01:00
Šarūnas Nejus
430c9db4e2 Create a function for processing a single track 2026-03-31 01:36:08 +01:00
Šarūnas Nejus
cc9d86fdcf Add types 2026-03-31 01:36:08 +01:00
Šarūnas Nejus
985e0d2bdb Import query classes explicitly 2026-03-31 01:36:08 +01:00
Šarūnas Nejus
2041d2e0e7 Move process_tracks to utils 2026-03-31 01:36:08 +01:00
Brock Grassy
4cef8c4093 Address review comments 2026-03-16 06:52:35 +00:00
Brock Grassy
7027060a0b Fix lint and mypy 2026-03-16 06:52:35 +00:00
Brock Grassy
6b62380b62 Change missing plugin to allow for filtering albums by release type 2026-03-16 06:52:35 +00:00
Šarūnas Nejus
9b63985989 Migrate MusicBrainz to shared search hooks
Move MusicBrainzPlugin to SearchApiMetadataSourcePlugin hooks.

Keep entity mapping and criteria in provider-specific hooks.

Update typing and tests for the candidate search path.
2026-03-08 09:00:14 +00:00
Šarūnas Nejus
1930400ab8 Set default release/recording includes in MusicBrainzAPI 2026-02-22 02:09:25 +00:00
Šarūnas Nejus
df1573ce9d Make MusicBrainzAPI logs visible 2026-02-07 22:36:43 +00:00
Šarūnas Nejus
1271b711f7 Format MusicBrainz search terms and escape Lucene special chars
Add a helper to lower/strip and escape Lucene query syntax.
Use it when building search queries and add unit tests.
2026-02-07 22:26:17 +00:00
Kirill A. Korinsky
78b6d537b6 Retries with 1, 2, 4, 8, 16, 32s backoff
At least it allows me to more or less use MusicBrainz
2026-01-30 00:46:13 +00:00
Serene
39f65f6b11 Merge branch 'master' into embedart-clear-improvements 2026-01-20 08:43:30 +10:00
Eric Masseran
3c34fd25f3 Merge branch 'master' into embedart-clear-improvements
* master: (37 commits)
  importsource: Test skip, Test reimport-skip
  Fix initial importsource plugin #4748 changelog
  importsource: fix potential prevent_suggest_removal crash
  Ensure that inc are joined with a plus
  Add retries for connection errors
  Add Usage block to RequestHandler
  Refactor HTTP request handling with RequestHandler base class
  Make musicbrainzngs dependency optional and requests required
  musicbrainz: remove error handling
  musicbrainz: access the custom server directly, if configured
  musicbrainz: browse directly
  musicbrainz: search directly
  musicbrainz: lookup recordings directly
  musicbrainz: lookup release directly
  Move pseudo release lookup under the plugin
  Add missing blame ignore revs from musicbrainz plugin
  Define MusicBrainzAPI class with rate limiting
  Move TimeoutSession under beetsplug._utils
  expand tests to include check for track artists
  remove changes for lastgenre as there was an existing PR for that work
  ...
2026-01-06 22:43:47 +01:00
Šarūnas Nejus
d4b00ab4f4 Add request handler utils to the docs 2026-01-06 09:54:02 +00:00
Šarūnas Nejus
59b02bc49b Type MusicBrainzAPI properly 2026-01-06 09:54:02 +00:00
Šarūnas Nejus
55b9c1c145 Retry on server errors too 2026-01-06 09:54:02 +00:00
Šarūnas Nejus
1447f49b72 Add some documentation to musicbrainz api mixins 2026-01-06 09:54:02 +00:00
Šarūnas Nejus
92352574aa Migrate mbcollection to use MusicBrainzAPI 2026-01-06 09:54:02 +00:00
Šarūnas Nejus
9349ad7551 Migrate missing to use MusicBrainzAPI 2026-01-06 00:51:50 +00:00
Šarūnas Nejus
a33371b6ef Migrate parentwork to use MusicBrainzAPI 2026-01-06 00:27:36 +00:00
Šarūnas Nejus
36964e433e Migrate listenbrainz plugin to use our MusicBrainzAPI implementation 2026-01-06 00:27:36 +00:00
Šarūnas Nejus
523fa6ceaf Move MusicBrainzAPI to a shared util 2026-01-06 00:26:41 +00:00
Šarūnas Nejus
d1aa45a008 Add retries for connection errors 2025-12-21 01:03:20 +00:00
Šarūnas Nejus
9dad040977 Add Usage block to RequestHandler 2025-12-21 00:40:40 +00:00
Šarūnas Nejus
72f7d6ebe3 Refactor HTTP request handling with RequestHandler base class
Introduce a new RequestHandler base class to introduce a shared session,
centralize HTTP request management and error handling across plugins.

Key changes:
- Add RequestHandler base class with a shared/cached session
- Convert TimeoutSession to use SingletonMeta for proper resource
  management
- Create LyricsRequestHandler subclass with lyrics-specific error
  handling
- Update MusicBrainzAPI to inherit from RequestHandler
2025-12-21 00:40:40 +00:00
Šarūnas Nejus
2a63e13617 musicbrainz: lookup release directly 2025-12-20 01:35:51 +00:00
Šarūnas Nejus
fda3bbaea5 Move TimeoutSession under beetsplug._utils 2025-12-20 01:35:51 +00:00
Eric Masseran
95f21b6e42 Remove log if no art to clear 2025-11-10 22:38:58 +01:00
Eric Masseran
8889c4ab47 Clear art on import 2025-11-10 22:38:37 +01:00
Eric Masseran
dd824e69b2 Clearart: Do not update files without an embedded image 2025-11-10 19:13:25 +01:00
Sebastian Mohr
4782e96599 Move vfs.py to beetsplug._utils package to avoid polluting core namespace (#6017)
This PR moves the `vfs.py` module, which is only used by plugins, to
avoid polluting the main beets namespace. Also exposes the `vfs` and
`art` module from beets with a deprecation warning.
2025-10-01 12:28:18 +02:00
Sebastian Mohr
a796d6d799 New import location for art.py 2025-09-20 14:01:38 +02:00
Sebastian Mohr
28aee0fde4 Moved arts.py file into beetsplug namespace as it is not used in core. 2025-09-20 14:01:38 +02:00