Commit graph

4193 commits

Author SHA1 Message Date
J0J0 Todos
6530d76319 Revert "Simplify _get_existing_genres()"
This reverts commit 7ff06df17c.

This was here for a reason: Ab empty string genre should als become an
empty list!
2025-01-21 17:44:17 +01:00
J0J0 Todos
4f0837c724 Revert "Include lower-casing in _get_existing already"
This reverts commit d5cf376a51.
2025-01-21 17:21:03 +01:00
J0J0 Todos
44901873f7 Clarify log-label: keep any, no-force 2025-01-21 17:04:03 +01:00
J0J0 Todos
d5cf376a51 Include lower-casing in _get_existing already
since we don't use it for early-returning no-force-existing genres
anymore.
2025-01-21 17:04:03 +01:00
J0J0 Todos
8da98e52ee Further clarify lastgenre log-labels
state if whitelist was applied or any genre is accepted.
2025-01-21 17:04:03 +01:00
J0J0 Todos
6e6a0ad9a9 Return empty tuple instead of disabling type issue 2025-01-21 17:04:03 +01:00
J0J0 Todos
c9187b40bd Don't uselessly split/join early returned genres 2025-01-21 17:04:03 +01:00
J0J0 Todos
169ec20a2f Remove unused _polish_existing_genres 2025-01-21 17:04:03 +01:00
J0J0 Todos
3cc2a5e2c6 Fix Tuple with tuple in sources property 2025-01-21 17:04:03 +01:00
J0J0 Todos
5d94eb3e13 Fix _get_genre docstring 2025-01-21 17:04:03 +01:00
J0J0 Todos
7ff06df17c Simplify _get_existing_genres()
Co-authored-by: Šarūnas Nejus <snejus@protonmail.com>
2025-01-21 17:04:03 +01:00
J0J0 Todos
c3f0abd61c Fix docstring _resolve_genres
Co-authored-by: Šarūnas Nejus <snejus@protonmail.com>
2025-01-21 17:04:03 +01:00
J0J0 Todos
bb3f9c53c2 lastgenre new defaults, remove config sanity check 2025-01-21 17:04:03 +01:00
J0J0 Todos
ca5e471f05 Refactor again _last_lookup 2025-01-21 17:04:03 +01:00
J0J0 Todos
ec10507fab Return as-is if no-force 2025-01-21 17:04:03 +01:00
J0J0 Todos
6e3f5b3127 Fix type hints, Refactor existing genres method
- Rename method _dedup_genre, since it's only used for
  finalizing/polishing existing genres.
- Return separator-delimited string already.
- Decide on not passing "separator" to methods, it's a config
  setting available throughout the plugin. Assign to variable where
  useful for readability though.
- In the force branch, remove re-assigning keep_genres to empty list.
- Fix a test. Existing genres are "polished" now, which means:
  configured title_case is applied.
- Fix/add type hints on all touched and new methods
2025-01-21 17:04:03 +01:00
J0J0 Todos
ed68bc019b Refactor _get_genre, simplify _combine_genre 2025-01-21 17:04:03 +01:00
J0J0 Todos
4580757c8e Simplify _last_lookup()
f-string, list comprehension, remove redundant vars.
2025-01-21 17:04:03 +01:00
J0J0 Todos
f16e671ff6 Simplify _get_genre keep_existing conditional
- If the keep_existing option is set, just remember everything for now.
- Dedup happening later on via _combine... _resolve_genres...
- Even knowing if whitelist or not is not important at this point.
2025-01-21 17:04:03 +01:00
J0J0 Todos
f698f21a28 Ensure _resolve returns list, add type hint
Prevents potential type erros when handing over to
_to_delimited_genre_string.
2025-01-21 17:04:03 +01:00
J0J0 Todos
d358a24ed9 Remove redundant unique_list call in _combine
and clarify in _resolve_genre docstring.
2025-01-21 17:04:02 +01:00
J0J0 Todos
2a80a10aa8 Use util.unique_list in fav of deduplicate 2025-01-21 17:04:02 +01:00
J0J0 Todos
79b5379dce Refactor and rename _is_valid() helper 2025-01-21 17:04:02 +01:00
J0J0 Todos
e1fe6fd3d0 Prevent album genre inherit only when source:track
is configured.
2025-01-21 17:04:02 +01:00
J0J0 Todos
bd0c02437a Apply temp logging leftover review suggestions
Useless variables that only were introduced for temporary debug logging
while refactoring earlier. Get rid of them.

Co-authored-by: Šarūnas Nejus <snejus@protonmail.com>
2025-01-21 17:04:02 +01:00
J0J0 Todos
b476560d76 Integrate _format_tag in _to_delimited_...
optimize by checking for config once and simplify tags list slicing.
Remove _format_tags method.

Co-authored-by: Šarūnas Nejus <snejus@protonmail.com>
2025-01-21 17:04:02 +01:00
J0J0 Todos
593f5460b6 Apply type hint suggestions from review
Co-authored-by: Šarūnas Nejus <snejus@protonmail.com>
2025-01-21 17:04:02 +01:00
J0J0 Todos
6b41743b91 Polish 'fetched last.fm tags' debug message
The best place to log what we actually fetched from last.fm seems to be
here in _combine_and_label_genres. Leave out the existing genres we also
receive in this function - less is more.
2025-01-21 17:04:02 +01:00
J0J0 Todos
8d43517a71 Remove all lastgenre temporary debug logging 2025-01-21 17:04:02 +01:00
J0J0 Todos
847b7260b4 Fix most popular track genre fetching (VA albums) 2025-01-21 17:04:02 +01:00
J0J0 Todos
1aca3989d7 Fix previous temp log messages 2025-01-21 17:04:02 +01:00
J0J0 Todos
da98d37632 Temporary debug messages in _sort_by_depth 2025-01-21 17:04:02 +01:00
J0J0 Todos
a717998587 Add a temporary log around whitelist setup 2025-01-21 17:04:02 +01:00
J0J0 Todos
37fc1b6b7f Final lastgenre plugin linting 2025-01-21 17:04:02 +01:00
J0J0 Todos
13ae699230 Fix _dedup_genre, ensure lower case
otherwise deduplicate() can't handle it.
2025-01-21 17:04:02 +01:00
J0J0 Todos
569ba73016 Refactor again _combine_and_label_genres 2025-01-21 17:04:02 +01:00
J0J0 Todos
3d036473e7 lastgenre _is_allowed detailed logging
- Add detailed debug logging to learn when and why things go wrong here.
- Shorten docstring
2025-01-21 17:04:02 +01:00
J0J0 Todos
9f5b4badb2 Handle genres as list, count/format/str helper
- Return fetched genres as a list from _resolve_genres().
- Format, limit to count and join to delimited string in helper
  function.
- Fix docstring.
- Leave a couple of temporary debug messages.
- Fix original genre fallback - just keep as-is.
2025-01-21 17:04:02 +01:00
J0J0 Todos
5e6d9170d7 Fix lastgenre "count" issue
When original genres were kept (keep_existing option), the final genre
count was "off". The reason was that reducing genres to that count is
handled in _resolve_genre which wasn't run.

- This fixes it by ensuring a run of _resolve_genre in
  _combine_and_label_genres.
- There is a small caveat though: New genres have been run through
  _resolve_genres already. When they are combined with the old ones,
  they run through it again. Let's take this into account for now and
  hope performance doesn't suffer too much.
2025-01-21 17:04:02 +01:00
J0J0 Todos
d0abc0d830 Rename lastgenre option, refactor, new default
- Refactor and simplify logic of _get_genre()
- Add a config validation function.
- New default force: yes, keep_existing: yes (closest to original
  behaviour)
2025-01-21 17:04:02 +01:00
J0J0 Todos
4c7d0c98cf Clarify lastgenre _is_allowed docstring 2025-01-21 17:04:02 +01:00
J0J0 Todos
90c48ea8cf Temporary lastgenre debug messages for @arsaboo 2025-01-21 17:04:02 +01:00
J0J0 Todos
b0e0f1b048 Fallback to next stage when fetch_ returns None
This was the original behaviour and broke when _combine_and_label helper
was introduced.
2025-01-21 17:04:02 +01:00
J0J0 Todos
462a7a524a _combine_and_label return None not empty str 2025-01-21 17:04:02 +01:00
J0J0 Todos
6866fce364 Fix default for _dedup_genre whitelist arg
when not stated otherwise whitelist_only must be disabled, we assume it
that way in _get_genre calls.
2025-01-21 17:04:02 +01:00
J0J0 Todos
cbc33e78fc lastgenre: Add comments over groups of methods
trying to get a little order in the chaos. Maybe reordering and/or
moving out of the main plugin logic would be a better idea for some
methods but don't put much more refactoring into this PR to keep it
readable.
2025-01-21 17:04:02 +01:00
J0J0 Todos
11f7a98917 Refactor keep/new genres combination
- Handle genre combination logic in a well documented helper function
  that also include type hints.
- Throughout the _get_genre function rename the result variable to
  new_genres to make it clearly descriptive.
- Rewrite thze _get_genre function's docstring.
2025-01-21 17:04:02 +01:00
J0J0 Todos
d935ec869c Implement --force and --keep-allowed behaviours
- Retrieving, filtering and deduplicating present genres of Items/Albums
  via separate methods.
- Implement all four cases of behaviour as described in PR#4982
- Issues:
  - There is quite some unnecessary spliting of genres from strings into
    lists and the other way round happening throughout the plugin.
  - In the case where existing genres get "augmented" with last.fm
    genres, we might end up with _more_ genres than the configured
    limit.
2025-01-21 17:04:02 +01:00
J0J0 Todos
318c02099a Add lastgenre keep_allowed options (-k/-K)
- Default to False.
- During PR#4982 discussions we came to the conclusion that the
  following behaviour would be a good new default choice:
  - Keep whitelisted existing genres
  - Only Fetch last.fm genres for empty tags.
  - To get this we also have to change the default of the force
    option!!!
  - Resulting in "force: no" and "keep_allowed: yes"; see Case 4 in
    PR#4982 description
- Options are not put to use yet, just defined and defaults set!
2025-01-21 17:04:02 +01:00
J0J0 Todos
4ea8650799 Use provided deduplicate function for keep_allowed
generation, instead of a simple set(). This way we keep the original
order of genres.
2025-01-21 17:04:02 +01:00
J0J0 Todos
fe466f4bb3 Use separator as configured instead of hardcoding
in lastgenre plugin.
2025-01-21 17:04:02 +01:00
J0J0 Todos
517c037c25 Refactor lastgenre keep_allowed to list comprehension 2025-01-21 17:04:02 +01:00
J0J0 Todos
7d6a4046ce Handle dups of existing genres in lastgenre plugin
When handling existing comma-separated genres in the _get_genre method
of the plugin, make sure duplicate genres are removed.
2025-01-21 17:04:02 +01:00
J0J0 Todos
6ab6ae2051 Fix track-level genre handling in lastgenre plugin
When `lastgenre.source: track` is configured,

- `lastgenre -a` _should not_ fall back to the album level genre (by
  making use of the with_album=False kwarg of the Libary's get method).
- `lastgenre -a`, when finally storing the genres of _an album_, should
  _not_ also write the tracks genres (by making use of the inherit=False
  kwarg of the Album's store method.
2025-01-21 17:04:02 +01:00
J0J0 Todos
4ff8c34ed1 Quickfix lastgenre always overwriting multi-genre 2025-01-21 17:04:02 +01:00
Šarūnas Nejus
bb5f3e0593
lyrics: sort lrclib lyrics by synced field and query search first
I found that the `/get` endpoint often returns incorrect or unsynced
lyrics, while results returned by the `/search` more accurate options.

Thus I reversed the change in the previous commit to prioritize
searching first.
2025-01-20 13:14:37 +00:00
Šarūnas Nejus
33aafdd50b
Remove trailing spaces in synced lyrics lines without text 2025-01-19 18:39:56 +00:00
Šarūnas Nejus
618c3a21a6
Try to GET LRCLib lyrics before searching 2025-01-19 18:39:54 +00:00
Šarūnas Nejus
2fb72c65a5
lyrics/LRCLib: handle instrumental lyrics 2025-01-19 15:19:44 +00:00
Šarūnas Nejus
30379bca38
Update lyrics.sources configuration to prioritize lrclib 2025-01-19 15:19:44 +00:00
Šarūnas Nejus
a398fbe62d
LRCLib: Improve exception handling 2025-01-19 15:19:44 +00:00
Šarūnas Nejus
8d4a569291
Fix fetching lyrics from lrclib
Adjust the base URL to perform a '/search' instead of attempting to
'/get' specific lyrics where we're unlikely to find lyrics for the
specific combination of album, artist, track names and the duration (see
https://lrclib.net/docs).

Since we receive an array of matching lyrics candidates, rank them by
their duration similarity to the item's duration, and whether they
contain synced lyrics.
2025-01-19 15:19:41 +00:00
Šarūnas Nejus
c250bfa724
Google: test the entire fetch method 2025-01-19 01:48:04 +00:00
Šarūnas Nejus
334bbde826
Make album, duration required for LyricsPlugin.fetch
Since at least one Backend requires album` and `duration` arguments
(`LRCLib`), the caller (`LyricsPlugin.fetch_item_lyrics`) must always
provide them.

Since they need to provided, we need to enforce this by defining them as
positional arguments.

Why is this important? I found that integrated `LRCLib` tests have been
passing, but they called `LRCLib.fetch` with values for `artist` and
`title` fields only, while the actual functionality *always* provides
values for `album` and `duration` fields too.

When I adjusted the test to provide values for the missing fields,
I found that it failed. This makes sense: Lib `album` and `duration`
filters are strict on LRCLib, so I was not surprised the lyrics could
not be found.

Thus I adjusted `LRCLib` backend implementation to only filter by each
of these fields when their values are truthy.
2025-01-19 01:48:04 +00:00
Šarūnas Nejus
0a12d07a94
Do not attempt to fetch lyrics with empty data
Modified `search_pairs` function in `lyrics.py` to:

* Firstly strip each of `artist`, `artist_sort` and `title` fields
* Only generate alternatives if both `artist` and `title` are not empty
* Ensure that `artist_sort` is not empty and not equal to artist (ignoring
  case) before appending it to the artists

Extended tests to cover the changes.
2025-01-19 01:48:04 +00:00
Šarūnas Nejus
3b73a26002
Address failing google sources tests
Two google sources failed to return the expected output. I looked into
each case why parsing failed:

- lyrics on musica.com contain <aside> Google Ads
- each lyrics line on lacoccinelle.net is wrapped within alternating
  <em> and <strong> tags

Thus remove these tags as part of the HTML cleanup logic.
2025-01-19 01:32:17 +00:00
Šarūnas Nejus
a8ad7df064
Use Item.field_query for queries that receive user input 2025-01-19 01:09:11 +00:00
Šarūnas Nejus
4650f6513b
Add Item.any_writable_media_field_query method for BPD search 2025-01-19 01:09:11 +00:00
J0J0 Todos
0c10635ff7 Another round of lastgenre logging nitpicks
- Printing out album/item in default format could lead to unreadable
  clutter depending on the user's configured formats.
- The album's name and the individual tracks' title should be just
  sufficient to provide context as well readability.
- Log like this while importing as well as in standalone runs.
2025-01-07 01:54:17 +01:00
J0J0 Todos
9d09d6f317 Fix lastgenre source:track handling during imports 2025-01-07 01:54:17 +01:00
J0J0 Todos
18e76f08c7 Prevent album genre inherit only when source:track
is configured.
2025-01-07 01:54:17 +01:00
J0J0 Todos
9ec2a8146f Streamline lastgenre singleton log with album log
It was rather confusing that the lastgenre plugin, when handling
singletons, sometimes showed that it applied genres from last.fm and
sometimes didn't (it did only in debug log). This streamlines the
behaviour:

- Change debug to info log.
- Streamline wording.
- Display details about the track.
2025-01-07 01:54:17 +01:00
J0J0 Todos
d4ada3ce43 Fix track-level genre handling in lastgenre plugin
When `lastgenre.source: track` is configured,

- `lastgenre -a` _should not_ fall back to the album level genre (by
  making use of the with_album=False kwarg of the Libary's get method).
- `lastgenre -a`, when finally storing the genres of _an album_, should
  _not_ also write the tracks genres (by making use of the inherit=False
  kwarg of the Album's store method.
2025-01-07 01:53:58 +01:00
Šarūnas Nejus
5c81f94cf7
Move imports required for typing under the TYPE_CHECKING block 2024-12-10 06:10:04 +00:00
Šarūnas Nejus
161b0522bb
Update deprecated imports 2024-12-10 06:10:04 +00:00
Šarūnas Nejus
7ef1b61070
Replace Union types by PEP604 pipe character 2024-12-10 06:10:04 +00:00
Šarūnas Nejus
51f9dd229e
Use PEP585 lowercase collections typing annotations 2024-12-10 06:10:03 +00:00
Edgars Supe
09360259cc lyrics: Fallback to plain lyrics if synced not available 2024-12-07 19:08:37 +02:00
Šarūnas Nejus
65e935bee5
Perform a regex substitution in the substitute plugin (#5357)
This utilises regex substitution in the substitute plugin. The previous
approach only used regex to match the pattern, then replaced it with a
static string. This change allows more complex substitutions, where the
output depends on the input.

### Example use case
Say we want to keep only the first artist of a multi-artist credit, as
in the following list:
```
Neil Young & Crazy Horse -> Neil Young
Michael Hurley, The Holy Modal Rounders, Jeffrey Frederick & The Clamtones -> Michael Hurley
James Yorkston and the Athletes -> James Yorkston
````
This would previously have required three separate rules, one for each
resulting artist. By using a regex substitution, we can get the desired
behaviour in a single rule:
```yaml
substitute:
  ^(.*?)(,| &| and).*: \1
```
(Capture the text until the first `,` ` &` or ` and`, then use that
capture group as the output)

### Notes
I've kept the previous behaviour of only applying the first matching
rule, but I'm not 100% sure it's the ideal approach.
I can imagine both cases where you want to apply several rules in
sequence and cases where you want to stop after the first match.
2024-11-22 05:02:50 +00: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
Š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
Joseph Bushell
4b78abd939 create seperate in_no_convert function, update tests 2024-10-26 19:09:56 +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
93aa569e3f Improve ListenBrainz error handling and simplify playlist handling 2024-10-25 10:06:54 -04:00
Nicholas Boyd Isacsson
8e0558b804 Apply substitute rules in sequence 2024-10-16 16:36:36 +02:00
Nicholas Boyd Isacsson
ffdc3f73ab Revert configuration format changes 2024-10-14 22:54:38 +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
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
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-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
Karl Besser
c66eb10445 Fix false positives in "feat. X" detection in ftintitle
The old version of the `ftintitle.contains_feat` function could lead to
false positives by matching words like "and" and "with" in the title,
even if there was no "feat. X" part.
With this commit, the `for_artist` keyword is explicitly passed to the
`plugins.feat_tokens` function to disable these matches when matching a
title (and not an artist).
2024-09-26 17:20:12 -04:00
Šarūnas Nejus
5f78d1b82b
Remove some lint exclusions and fix the issues
* Replace `noqa` comments in `assert...` method definitions with
  a configuration option to ignore these names.
* Use the `__all__` variable to specify importable items from the
  module, replacing `*` imports and `noqa` comments for unused imports.
* Address issues with poorly named variables and methods by renaming
  them appropriately.
2024-09-21 11:59:19 +01:00
Šarūnas Nejus
f36bc497c8
Fix lint issues
- Fix imports
- Fix pytest issues
- Do not assign lambda as variable
- Use isinstance instead of type to check type
- Rename ambiguously named variables
- Name custom errors with Error suffix
2024-09-21 11:59:18 +01:00
Šarūnas Nejus
85a17ee503
Reformat the codebase 2024-09-21 11:57:48 +01:00
Karl Besser
218cda0401 Fix missing keep_in_artist option in ftintitle
The newly introduced option to keep the feat. artist in the artist field
when importing with the ftintitle plugin was not passed in one function.
2024-09-20 20:47:10 -04:00
Konstantin
796c9addfb
Fixes TypeError in the Discogs plugin (#5415)
Handles the case when discogs return `None` for format descriptions.

---------

Co-authored-by: Šarūnas Nejus <snejus@protonmail.com>
2024-09-19 21:27:16 +01:00
Šarūnas Nejus
c13f0f2f6e
Deezer: Improve requests error handling (#5421)
This PR adds gracefully handling requests error in teh Deezer plugin.
2024-09-17 18:52:42 +01:00
Alok Saboo
7f74d3db4c
Update beetsplug/deezer.py
Co-authored-by: Šarūnas Nejus <snejus@protonmail.com>
2024-09-17 13:23:11 -04:00
Šarūnas Nejus
5785522170
fetchart: defer file removal config option evaluation (#5244)
Defer the evaluation of the source file removal options (`import.delete`
and `import.move`) to the point where the fetchart plugin is actually
called instead of only evaluating those configuration options on plugin
initialization.
This is to allow other plugins (such as the
[ytimport](https://github.com/mgoltzsche/beets-ytimport/blob/v1.8.1/beetsplug/ytimport/__init__.py#L194)
plugin) to invoke the import directly (within the same python process;
implicitly invoking the fetchart plugin) with temporarily overwritten
configuration options.

Addresses
https://github.com/beetbox/beets/issues/5167#issuecomment-2106465172
2024-09-16 11:44:46 +01:00
Alok Saboo
afe43dc360 Fix lint errors 2024-09-15 11:36:16 -04:00
Alok Saboo
f57dc66444 Deezer: Improve requests error handling
## Description

This PR adds gracefully handling requests error in teh Deezer plugin. Right now, it errors out when it receives error:

```bash
Traceback (most recent call last):
  File "/home/arsaboo/.local/bin/beet", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/arsaboo/.local/lib/python3.12/site-packages/beets/ui/__init__.py", line 1865, in main
    _raw_main(args)
  File "/home/arsaboo/.local/lib/python3.12/site-packages/beets/ui/__init__.py", line 1852, in _raw_main
    subcommand.func(lib, suboptions, subargs)
  File "/home/arsaboo/.local/lib/python3.12/site-packages/beets/ui/commands.py", line 1395, in import_func
    import_files(lib, paths, query)
  File "/home/arsaboo/.local/lib/python3.12/site-packages/beets/ui/commands.py", line 1326, in import_files
    session.run()
  File "/home/arsaboo/.local/lib/python3.12/site-packages/beets/importer.py", line 360, in run
    pl.run_parallel(QUEUE_SIZE)
  File "/home/arsaboo/.local/lib/python3.12/site-packages/beets/util/pipeline.py", line 447, in run_parallel
    raise exc_info[1].with_traceback(exc_info[2])
  File "/home/arsaboo/.local/lib/python3.12/site-packages/beets/util/pipeline.py", line 312, in run
    out = self.coro.send(msg)
          ^^^^^^^^^^^^^^^^^^^
  File "/home/arsaboo/.local/lib/python3.12/site-packages/beets/util/pipeline.py", line 195, in coro
    func(*(args + (task,)))
  File "/home/arsaboo/.local/lib/python3.12/site-packages/beets/importer.py", line 1497, in lookup_candidates
    task.lookup_candidates()
  File "/home/arsaboo/.local/lib/python3.12/site-packages/beets/importer.py", line 688, in lookup_candidates
    artist, album, prop = autotag.tag_album(
                          ^^^^^^^^^^^^^^^^^^
  File "/home/arsaboo/.local/lib/python3.12/site-packages/beets/autotag/match.py", line 548, in tag_album
    for matched_candidate in hooks.album_candidates(
  File "/home/arsaboo/.local/lib/python3.12/site-packages/beets/plugins.py", line 593, in decorated
    for v in generator(*args, **kwargs):
  File "/home/arsaboo/.local/lib/python3.12/site-packages/beets/autotag/hooks.py", line 759, in album_candidates
    yield from plugins.candidates(items, artist, album, va_likely, extra_tags)
  File "/home/arsaboo/.local/lib/python3.12/site-packages/beets/plugins.py", line 390, in candidates
    yield from plugin.candidates(
               ^^^^^^^^^^^^^^^^^^
  File "/home/arsaboo/.local/lib/python3.12/site-packages/beets/plugins.py", line 772, in candidates
    results = self._search_api(query_type="album", filters=query_filters)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/arsaboo/.local/lib/python3.12/site-packages/beetsplug/deezer.py", line 282, in _search_api
    response.raise_for_status()
  File "/home/arsaboo/.local/lib/python3.12/site-packages/requests/models.py", line 1024, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://api.deezer.com/search/album?q=album%3A%22Y+Hate+%3F%22+artist%3A%22Parmish+Verma%22
```

## To Do

- [ ] Documentation. (If you've added a new command-line flag, for example, find the appropriate page under `docs/` to describe it.)
- [x] Changelog. (Add an entry to `docs/changelog.rst` to the bottom of one of the lists near the top of the document.)
- [ ] Tests. (Very much encouraged but not strictly required.)
2024-09-15 11:34:29 -04:00
Max Goltzsche
00add272ce
fetchart: apply review remarks
simplifying config access

Co-authored-by: Šarūnas Nejus <snejus@protonmail.com>
2024-09-13 23:09:49 +02:00
Karl-Ludwig Besser
39acba5200
Merge branch 'master' into ftintitle_keep_artist 2024-09-05 12:32:20 +02:00
Karl Besser
15d652dbae Update log message for keeping artist in ftintitle
Update the log message when the artist is kept unchanged due to setting
the keep_in_artist option to true.
2024-09-05 12:28:51 +02:00
Šarūnas Nejus
591e04a894
Add Item.filepath property to simplify path handling
Additionally, fix DefaultTemplateFunctions._func_names definition.
2024-08-19 22:44:17 +01:00
Šarūnas Nejus
8f02020db4
autobpm: handle errors in beat.beat_track as well 2024-08-19 22:44:17 +01:00
Šarūnas Nejus
3c51128d9b
autobpm: do not call get on boolean config options 2024-08-19 22:44:17 +01:00
Šarūnas Nejus
ee2f114342
autobpm: add types 2024-08-19 22:44:17 +01:00
Šarūnas Nejus
e3776f1910
autobpm: Do not import 'beat' subpackage immediately to improve startup time 2024-08-19 22:44:16 +01:00
Šarūnas Nejus
5b5c564a69
autobpm: Add a new beat_track_kwargs configuration option to autobpm 2024-08-19 22:44:16 +01:00
Šarūnas Nejus
49cae5ca23
autobpm: Fix the issue with tempo being a numpy array 2024-08-19 22:44:16 +01:00
Šarūnas Nejus
1163645604
Make sure tests do not leave any temp files behind (#5345)
Fixes #5229, is part of #5361 and relates to #5285.

I have to admit thsi was a fairly tough task - I initially assumed that
the problem lies
with how the tests are setup, and that we're probably missing some
`teardown_beets` calls
here and there.

Unfortunately, it was not so simple. I came across several issues that
gave rise to
leftover temporary files:

1. `fetchart`, `artresizer` and `play` handling of temporary files.
These plugins created
isolated temporary files outside of the directories that tests clean up.
You will find
I added a couple of functions (namely `get_module_tempdir`) that force
these plugins to
create files in directories determined by their module names. This way
we can clean up
   after them using the new `CleanupModulesMixin`.

2. Tests that ran temporary directories setup twice, running
`_common.TestCase.setUp` and
`test.helper.TestHelper.setup_beets`. Both of these ran `self.temp_dir =
mkdtemp()`,
therefore the directories created by the initial setup persisted since
those have been
overridden and thus unreachable in the teardown. Here, I removed the
`setUp` calls, see

   - `test/plugins/test_embedart.py`
   - `test/test_importer.py`
   - and `test/test_plugins.py` where `setup_beets` was called twice

3. `test/test_config_command.py` attempted to manage the temporary
directory by itself,
where I found that `tearDown` failed to remove the directory for four
tests. Could not
figure out the cause, and found that delegating this task to
`TestHelper` fixed the
   issue.

4. Mediafile fixture removal depended on calling
`remove_mediafile_fixtures` method, which
`test/plugins/test_zero.py` failed to do. I made the fixtures to be
created within the
same `temp_dir` directory that gets removed in the teardown, so now they
are taken care
   of automatically.

In summary, see the test modules that left files behind:

```
Temp files created by test/__init__.py
Temp files created by test/plugins/__init__.py
Temp files created by test/plugins/lyrics_download_samples.py
Temp files created by test/plugins/test_acousticbrainz.py
Temp files created by test/plugins/test_advancedrewrite.py
Temp files created by test/plugins/test_albumtypes.py
Temp files created by test/plugins/test_art.py
	/tmp/tmp11nicahe.jpg
	/tmp/tmp1bjmodum.png
	/tmp/tmped7nhls4.jpg
	/tmp/tmpflnzr9wz.jpg
	/tmp/tmpjngkauqs.png
	/tmp/tmpkzy9mn6t.jpg
	/tmp/tmpph_wmuea.jpg
	/tmp/tmps6gk58i_.jpg
	/tmp/tmpz2eji_o4.jpg
Temp files created by test/plugins/test_aura.py
Temp files created by test/plugins/test_bareasc.py
	/tmp/tmphl3kzhug
	/tmp/tmpnh2q6v02
	/tmp/tmpppw5qrhz
Temp files created by test/plugins/test_beatport.py
Temp files created by test/plugins/test_bucket.py
Temp files created by test/plugins/test_convert.py
Temp files created by test/plugins/test_discogs.py
Temp files created by test/plugins/test_edit.py
Temp files created by test/plugins/test_embedart.py
	/tmp/tmp1ayvqzhx
	/tmp/tmp58k6mdfx.jpg
	/tmp/tmp64c2lqiv
	/tmp/tmp6nar4kr5
	/tmp/tmp6u0d5dex
	/tmp/tmpacoq7w_f
	/tmp/tmpajnr_sxr
	/tmp/tmpasj16beh
	/tmp/tmpboyaixb5
	/tmp/tmpcrmcyt5r
	/tmp/tmpdomje5g3
	/tmp/tmplu3o6t6g
	/tmp/tmpns_xvkns
	/tmp/tmpo87o1h6o.jpg
	/tmp/tmpqem39h_j
	/tmp/tmprlzm18pb
	/tmp/tmpt22v4u6x
	/tmp/tmptp3rxdgv
Temp files created by test/plugins/test_embyupdate.py
Temp files created by test/plugins/test_export.py
Temp files created by test/plugins/test_fetchart.py
Temp files created by test/plugins/test_filefilter.py
Temp files created by test/plugins/test_ftintitle.py
Temp files created by test/plugins/test_hook.py
Temp files created by test/plugins/test_ihate.py
Temp files created by test/plugins/test_importadded.py
Temp files created by test/plugins/test_importfeeds.py
Temp files created by test/plugins/test_info.py
Temp files created by test/plugins/test_ipfs.py
Temp files created by test/plugins/test_keyfinder.py
Temp files created by test/plugins/test_lastgenre.py
Temp files created by test/plugins/test_limit.py
Temp files created by test/plugins/test_lyrics.py
Temp files created by test/plugins/test_mbsubmit.py
Temp files created by test/plugins/test_mbsync.py
Temp files created by test/plugins/test_mpdstats.py
Temp files created by test/plugins/test_parentwork.py
Temp files created by test/plugins/test_permissions.py
Temp files created by test/plugins/test_player.py
Temp files created by test/plugins/test_playlist.py
Temp files created by test/plugins/test_play.py
	/tmp/tmp6ohknmve.m3u
	/tmp/tmp8rw2z_j4.m3u
	/tmp/tmp9vi27ypx.m3u
	/tmp/tmpa_s66jh8.m3u
	/tmp/tmpb7h3cn3n.m3u
	/tmp/tmpexbmqvry.m3u
	/tmp/tmpinbqrt80.m3u
	/tmp/tmpql02hax5.m3u
	/tmp/tmpvbdzprsf.m3u
	/tmp/tmpzipim36x.m3u
Temp files created by test/plugins/test_plexupdate.py
Temp files created by test/plugins/test_plugin_mediafield.py
Temp files created by test/plugins/test_random.py
Temp files created by test/plugins/test_replaygain.py
Temp files created by test/plugins/test_smartplaylist.py
Temp files created by test/plugins/test_spotify.py
Temp files created by test/plugins/test_subsonicupdate.py
Temp files created by test/plugins/test_the.py
Temp files created by test/plugins/test_thumbnails.py
Temp files created by test/plugins/test_types_plugin.py
Temp files created by test/plugins/test_web.py
Temp files created by test/plugins/test_zero.py
	/tmp/tmp3ub9xmzy
Temp files created by test/rsrc/beetsplug/test.py
Temp files created by test/rsrc/convert_stub.py
Temp files created by test/testall.py
Temp files created by test/test_art_resize.py
	/tmp/tmp3p7p60ih.jpg
	/tmp/tmp8exclgit.jpg
	/tmp/tmpkrrjsitl.jpg
	/tmp/tmpw6n8ee8e.jpg
	/tmp/tmpygws_0aw.jpg
Temp files created by test/test_autotag.py
Temp files created by test/test_config_command.py
	/tmp/tmp333f0r2j
	/tmp/tmphr356z5r
	/tmp/tmporp4rag2
	/tmp/tmpy7sjqdsw
Temp files created by test/test_datequery.py
Temp files created by test/test_dbcore.py
Temp files created by test/test_files.py
Temp files created by test/test_hidden.py
Temp files created by test/test_importer.py
	/tmp/tmp0m363gfb
	/tmp/tmp2n3i13mc
	/tmp/tmpxk3v304s
Temp files created by test/test_library.py
Temp files created by test/test_logging.py
Temp files created by test/test_m3ufile.py
Temp files created by test/test_mb.py
Temp files created by test/test_metasync.py
Temp files created by test/test_pipeline.py
Temp files created by test/test_plugins.py
	/tmp/tmp6pxhx67u
	/tmp/tmpb8pqi9ui
	/tmp/tmpcx_658g7
	/tmp/tmp_giqb9jz
	/tmp/tmpgm9xk94_
	/tmp/tmpk60l6bt3
	/tmp/tmpqoj4la68
	/tmp/tmptcdu20rp
	/tmp/tmpvr7k5shn
	/tmp/tmpwnfnzs91
Temp files created by test/test_query.py
Temp files created by test/test_sort.py
Temp files created by test/test_template.py
Temp files created by test/test_ui_commands.py
	/tmp/tmpns2u94w6
Temp files created by test/test_ui_importer.py
Temp files created by test/test_ui_init.py
Temp files created by test/test_ui.py
Temp files created by test/test_util.py
Temp files created by test/test_vfs.py
```

And that's what we have right now:

```
Temp files created by test/__init__.py
Temp files created by test/plugins/__init__.py
Temp files created by test/plugins/lyrics_download_samples.py
Temp files created by test/plugins/test_acousticbrainz.py
Temp files created by test/plugins/test_advancedrewrite.py
Temp files created by test/plugins/test_albumtypes.py
Temp files created by test/plugins/test_art.py
Temp files created by test/plugins/test_aura.py
Temp files created by test/plugins/test_bareasc.py
Temp files created by test/plugins/test_beatport.py
Temp files created by test/plugins/test_bucket.py
Temp files created by test/plugins/test_convert.py
Temp files created by test/plugins/test_discogs.py
Temp files created by test/plugins/test_edit.py
Temp files created by test/plugins/test_embedart.py
Temp files created by test/plugins/test_embyupdate.py
Temp files created by test/plugins/test_export.py
Temp files created by test/plugins/test_fetchart.py
Temp files created by test/plugins/test_filefilter.py
Temp files created by test/plugins/test_ftintitle.py
Temp files created by test/plugins/test_hook.py
Temp files created by test/plugins/test_ihate.py
Temp files created by test/plugins/test_importadded.py
Temp files created by test/plugins/test_importfeeds.py
Temp files created by test/plugins/test_info.py
Temp files created by test/plugins/test_ipfs.py
Temp files created by test/plugins/test_keyfinder.py
Temp files created by test/plugins/test_lastgenre.py
Temp files created by test/plugins/test_limit.py
Temp files created by test/plugins/test_lyrics.py
Temp files created by test/plugins/test_mbsubmit.py
Temp files created by test/plugins/test_mbsync.py
Temp files created by test/plugins/test_mpdstats.py
Temp files created by test/plugins/test_parentwork.py
Temp files created by test/plugins/test_permissions.py
Temp files created by test/plugins/test_player.py
Temp files created by test/plugins/test_playlist.py
Temp files created by test/plugins/test_play.py
Temp files created by test/plugins/test_plexupdate.py
Temp files created by test/plugins/test_plugin_mediafield.py
Temp files created by test/plugins/test_random.py
Temp files created by test/plugins/test_replaygain.py
Temp files created by test/plugins/test_smartplaylist.py
Temp files created by test/plugins/test_spotify.py
Temp files created by test/plugins/test_subsonicupdate.py
Temp files created by test/plugins/test_the.py
Temp files created by test/plugins/test_thumbnails.py
Temp files created by test/plugins/test_types_plugin.py
Temp files created by test/plugins/test_web.py
Temp files created by test/plugins/test_zero.py
Temp files created by test/rsrc/beetsplug/test.py
Temp files created by test/rsrc/convert_stub.py
Temp files created by test/testall.py
Temp files created by test/test_art_resize.py
Temp files created by test/test_autotag.py
Temp files created by test/test_config_command.py
Temp files created by test/test_datequery.py
Temp files created by test/test_dbcore.py
Temp files created by test/test_files.py
Temp files created by test/test_hidden.py
Temp files created by test/test_importer.py
Temp files created by test/test_library.py
Temp files created by test/test_logging.py
Temp files created by test/test_m3ufile.py
Temp files created by test/test_mb.py
Temp files created by test/test_metasync.py
Temp files created by test/test_pipeline.py
Temp files created by test/test_plugins.py
Temp files created by test/test_query.py
Temp files created by test/test_sort.py
Temp files created by test/test_template.py
Temp files created by test/test_ui_commands.py
Temp files created by test/test_ui_importer.py
Temp files created by test/test_ui_init.py
Temp files created by test/test_ui.py
Temp files created by test/test_util.py
Temp files created by test/test_vfs.py
```

Note that the command which provides the output is now available through
`poe`.
2024-07-18 12:25:23 +01:00
Serene-Arc
79449b0851
Filter ending newlines 2024-07-11 15:15:40 +10:00
Karl Besser
c046dc3976 Add new keep_in_artist option for ftintitle plugin
The new keep_in_artist option allows keeping the feat. part in the
artist metadata field while still changing the title.
2024-07-09 23:49:20 -04:00
HomerHaddock
50bfe6a179 Fix bug #4815 2024-07-06 23:10:33 -06:00
Šarūnas Nejus
0682d0d030
test_play: Remove files generated by play plugin 2024-07-02 15:35:24 +01:00
Šarūnas Nejus
1fda7b6111
fetchart, artresizer: Create art files in predictable directories
This allows to clean them up in art (1) fetching, (2) resizing and (3)
deinterlace tests.
2024-07-02 15:35:24 +01:00
Max Goltzsche
90f0ae2d93
fetchart: defer file removal config option eval
Defer the evaluation of the source file removal options (`import.delete` and `import.move`) to the point where the fetchart plugin is actually called instead of only evaluating those configuration options on plugin initialization.
This is to allow other plugins (such as the [ytimport](https://github.com/mgoltzsche/beets-ytimport/blob/v1.8.1/beetsplug/ytimport/__init__.py#L194) plugin) to invoke the import directly (within the same python process; implicitly invoking the fetchart plugin) with temporarily overwritten configuration options.

Relates to https://github.com/beetbox/beets/issues/5167#issuecomment-2106465172
2024-06-26 01:53:04 +02:00
Serene
de0742b9d6
Merge branch 'master' into bug-fetchart-resize-logic-fix 2024-06-25 14:30:39 +10:00
Šarūnas Nejus
4e06b59b60
Filter albums by tracks fields and vice versa (#5327)
Fixes #4360

This PR enables querying albums by track fields and tracks by album
fields, and speeds up querying albums by `path` field.

It originally was part of #5240, however we found that the changes
related to the flexible attributes caused degradation in performance. So
this PR contains the first part of #5240 which joined `items` and
`albums` tables in queries.
2024-06-25 02:04:45 +01:00
Arkadiy Illarionov
1c020b8264 Check Python version instead of catching ImportError 2024-06-22 19:55:52 +03:00
Arkadiy Illarionov
859072ee9e Use typing_extensions only when needed
Self was added in Python 3.11
TypeAlias was added in Python 3.10
2024-06-22 16:02:24 +03:00
Šarūnas Nejus
981a61bd56
Add support for filtering relations 2024-06-21 15:05:29 +01:00
Šarūnas Nejus
2800a323a2
Revert "Make queries fast, filter all flexible attributes (#5240)"
This reverts commit 143b9202f3, reversing
changes made to 8508a57d77.
2024-06-19 21:51:44 +01:00
Šarūnas Nejus
2c4b42d167
Keep the same FieldQuery.field interface as before 2024-06-17 08:59:20 +01:00
Šarūnas Nejus
1f93207823
Add any_writable_field_query to fix bpd search 2024-06-16 15:28:46 +01:00
Šarūnas Nejus
e0c50c5501
Remove slow lookups from beetsplug/aura
It seems like previously filtering by flexible attributes did not work
- I'd receive '{"data": []}' trying to GET `/aura/tracks?filter[play_count]=11`

Now this works, not only for tracks, but for `/aura/artists` and
`/aura/albums` too.

Additionally, this improves `/aura/tracks` response time significantly.
I tried loading the default of 500 tracks from my library:

On `master`, it took ~20s
After this commit, it takes under 1s.
2024-06-16 15:28:46 +01:00
Šarūnas Nejus
b0154d5cde
Fix querying fields present in both tables 2024-06-16 15:28:45 +01:00
Šarūnas Nejus
19470f3d76
Use native os.cpu_count
os.cpu_count has only been available since Python 3.4
2024-06-16 00:52:38 +01:00
Šarūnas Nejus
f388ff6ec1
Replace py3_path with builtin os.fsdecode
`os.fsdecode` has only been available since Python 3.2.
2024-06-16 00:52:37 +01:00
Vrihub
e6b773561b Refactor regexps in PATTERNS 2024-06-15 20:58:41 +02:00
Vrihub
09660426a8 Logging: add message about the pattern being tried 2024-06-15 20:56:40 +02:00
Vrihub
b5216a06f4 Proposed fix for issue #5218
Check for existence of "title" matching group before using it
2024-06-15 20:52:55 +02:00
Arav K.
549fea14cd [util/pipeline] use 'Queue' without generics
Apparently Python 3.8 does not support generic type parameters on the
built-in 'queue.Queue' type?
2024-06-12 15:59:31 +02:00
Arav K.
d3bdf137ea Resolve some 'mypy' errors 2024-06-12 15:58:00 +02:00
Šarūnas Nejus
0966e3c653
Test aura (#5239)
In #4746 I was making a small adjustment in beetsplug/aura.py and found
that the module wasn't tested. So this PR adds some high-level tests to
act a safeguard for any future adjustments.
2024-06-10 13:07:48 +01:00
Šarūnas Nejus
179405ed82
A couple of small updates in the code 2024-06-05 04:41:02 +01:00
Lev Gorodetskiy
2a4cf0d335
Codestyle 2024-05-26 11:57:24 -03:00
Lev Gorodetskiy
2130404217
Add timeout to all requests calls 2024-05-25 12:24:53 -03:00
Šarūnas Nejus
e9ce625879
Dedupe get_attribute_converter 2024-05-07 21:15:00 +01:00
Šarūnas Nejus
6ee734685d
Feed in app context and args into Document to allow testing
This will be help with testing each of the documents which do not
any more depend on the 'global' `current_app` and `request`. These two
can now be provided at the time the objects are instantiated.
2024-05-07 19:55:02 +01:00
Šarūnas Nejus
7d636d8f22
Add support for a specific type in InQuery 2024-04-30 22:20:36 +01:00
Šarūnas Nejus
68eee96c03
Define InQuery and use it in PlaylistQuery
While working on the DB optimisation I discovered one query which does
not follow the 'FieldQuery' interface - 'PlaylistQuery', so I looked
into it in more detail.

One special thing about it is that it uses 'IN' SQL operator, so
I defined 'InQuery' query class to have this logic outside of the
playlist context.

Otherwise, it seems like 'PlaylistQuery' is a field query, even if it
has a very special way of resolving values it wants to query. In the
future, we may want to consider moving this kind of custom
_initialisation_ logic away from '__init__' methods to
factory/@classmethod: this should make it more clear that the purpose of
such logic is to resolve the data that is required to define
a particular FieldQuery class fully.
2024-04-30 22:20:36 +01:00
wisp3rwind
a9423b7b2d lyrics: remove version switch that became obsolete when we dropped Python 3.5 2024-04-27 16:02:26 +02:00
J0J0 Todos
d510177820
Merge pull request #5121 from mgoltzsche/generate-playlist-item-attributes 2024-04-20 08:04:32 +02:00
Max Goltzsche
883bbb3e4b
smartplaylist: rename output format m3u8 to extm3u 2024-04-13 04:55:43 +02:00
Max Goltzsche
c0afd3eb3c
smartplaylist: allow exporting item fields
Allow generating extm3u playlists so that they contain additional item fields such as the `id`.

The feature is required by the mgoltzsche/beets-webm3u plugin (M3U server) to transform playlists using a request based item URI template which may require additional fields such as the `id`, e.g. `beets:library:track;$id`.
2024-04-13 04:55:37 +02:00
Dr-Blank
6a27a8de3c
satisfy the linter 2024-04-11 13:42:56 -04:00
Dr-Blank
c88953805b
bugfix: ignore subdirectories of ignored
directories in unimported plugin
2024-03-22 18:20:47 -04:00
Dr-Blank
66b459b8d0
Refactor Candidate class in fetchart.py to improve
validation and resizing logic
2024-03-18 09:17:33 -04:00
Serene
3548e35360
Merge pull request #5122 from Bobo1239/master
convert: Correctly identify WAVE format as lossless
2024-03-02 09:05:53 +10:00
Boris-Chengbiao Zhou
47ba590999 convert: Correctly identify WAVE format as lossless
Seems like this entry was added before mediafile gained support for WAVE
files in commit 832f3d. Adjust it to fix detection.
2024-03-01 17:58:26 +01:00
Serene
8720d6413b
Merge pull request #5063 from Maxr1998/fix-advancedrewrite-simple-rules
advancedrewrite: Fix simple rules being overwritten by advanced rules
2024-03-01 16:08:37 +10:00
Serene
35e8eb985f
Merge pull request #5058 from arsaboo/lb
Add initial version of the Listenbrainz plugin
2024-03-01 15:51:50 +10:00
Serene-Arc
83242fd7cf Apply formatting 2024-03-01 15:21:25 +10:00
Maxr1998
ba66808c74
advancedrewrite: Fix multi-valued fields specified as a single string 2024-01-01 19:33:22 +01:00
Maxr1998
b1d9169abe
advancedrewrite: Fix simple rules being overwritten by advanced rules 2024-01-01 18:32:06 +01:00
Alok Saboo
ce023a3c53 Revert unwanted commits 2023-12-25 17:14:45 -05:00
Alok Saboo
7838e70d41 Revert "Merge remote-tracking branch 'upstream/master' into lb"
This reverts commit 6bfe26642c, reversing
changes made to 9b8dbe8055.
2023-12-23 12:25:22 -05:00
Alok Saboo
6bfe26642c Merge remote-tracking branch 'upstream/master' into lb 2023-12-23 12:19:30 -05:00
Alok Saboo
9b8dbe8055 Add logging 2023-12-23 12:19:04 -05:00
Alok Saboo
47584f20cb Formatting 2023-12-22 16:13:01 -05:00
Alok Saboo
537b57d99d Make sure only Jams and Exploration playlists are added.
Sometimes, there are other playlists that are created (e.g., Top Missed Recordings of 2023, Top Discoveries of 2023). Right now, I am excluding these. We may want to address them separately.
2023-12-22 16:12:42 -05:00
Alok Saboo
71a6a4fb4a Formatting 2023-12-22 10:25:42 -05:00
Alok Saboo
7440ca51fb Error handling 2023-12-22 10:25:27 -05:00
Alok Saboo
2eb8000a0b Update docstrings 2023-12-21 12:24:04 -05:00
Alok Saboo
0ed65564b3 Update listenbrainz.py 2023-12-21 12:16:24 -05:00
Alok Saboo
4541644961 Updated docs 2023-12-21 11:57:14 -05:00
Alok Saboo
e8dc2cb5da Sort imports 2023-12-21 09:27:21 -05:00
Alok Saboo
4f6689742c Update listenbrainz.py 2023-12-20 10:47:50 -05:00
Alok Saboo
b010fb507f Update listenbrainz.py 2023-12-20 10:30:14 -05:00
Alok Saboo
75deae5f47 Update lastimport.py 2023-12-20 10:28:45 -05:00
Alok Saboo
c445e5ee79 Update listenbrainz.py 2023-12-20 10:26:05 -05:00
Alok Saboo
d83a07d368 Update listenbrainz.py 2023-12-20 10:23:54 -05:00
Alok Saboo
ec3711f4a9 Update lastimport.py 2023-12-20 10:23:33 -05:00
Alok Saboo
5e4cb20c4a Update lastimport.py 2023-12-20 10:21:45 -05:00
Alok Saboo
135faac62e Update lastimport.py 2023-12-20 10:20:16 -05:00
Alok Saboo
c437a5594e Update lastimport.py 2023-12-20 10:16:33 -05:00
Alok Saboo
d7823a0f24 Update lastimport.py 2023-12-20 10:15:07 -05:00
Alok Saboo
272c7c32bc Allow handling of None 2023-12-20 10:13:09 -05:00
Alok Saboo
6d44c6af00 Update listenbrainz.py 2023-12-20 10:06:02 -05:00
Alok Saboo
3ead37775e Update listenbrainz.py 2023-12-20 09:47:42 -05:00
Alok Saboo
fc9e68eccf Update listenbrainz.py 2023-12-20 09:46:06 -05:00
Alok Saboo
aa117bb760 Update listenbrainz.py 2023-12-20 09:45:02 -05:00
Max Goltzsche
6b929c6e72
web: fix range request support
Do not let the web plugin overwrite the Content-Length header with the full file length since flask/werkzeug sets the requested range's/chunk's size when handling a range request.
This allows to play large audio/opus files using e.g. a browser/firefox or gstreamer/mopidy without making a reverse-proxy/nginx emulate range request support and hide range-related headers from the backend.
2023-12-20 01:23:13 +01:00
Alok Saboo
4a46769a2c Update listenbrainz.py 2023-12-19 18:40:34 -05:00
Alok Saboo
84da424fae Update listenbrainz.py 2023-12-19 18:39:36 -05:00
Alok Saboo
f5735f6e09 Update listenbrainz.py 2023-12-19 18:24:53 -05:00
Alok Saboo
d17d1468c9 Update listenbrainz.py 2023-12-19 18:23:21 -05:00
Alok Saboo
b39779d838 Update listenbrainz.py 2023-12-19 18:16:22 -05:00
Alok Saboo
a0b41e8474 Update listenbrainz.py 2023-12-19 18:13:11 -05:00
Alok Saboo
f376c21b03 Update listenbrainz.py 2023-12-19 18:12:16 -05:00
Alok Saboo
a35d7648b1 Update listenbrainz.py 2023-12-19 18:10:36 -05:00
Alok Saboo
af55c1ecb8 Update listenbrainz.py 2023-12-19 18:06:45 -05:00
Alok Saboo
9e7b70903c Update listenbrainz.py 2023-12-19 17:24:24 -05:00
Alok Saboo
14063951bf Update listenbrainz.py 2023-12-19 17:18:54 -05:00
Alok Saboo
3000664344 Update listenbrainz.py 2023-12-19 17:13:08 -05:00
Alok Saboo
f3d8655ee5 Update listenbrainz.py 2023-12-19 17:12:12 -05:00
Alok Saboo
92bb8584d4 Update listenbrainz.py 2023-12-19 17:10:29 -05:00
Alok Saboo
cac7f7d2dd Update listenbrainz.py 2023-12-19 17:06:50 -05:00
Alok Saboo
efcb54995e Update listenbrainz.py 2023-12-19 17:06:11 -05:00
Alok Saboo
e884d78351 Update listenbrainz.py 2023-12-19 17:05:07 -05:00
Alok Saboo
cd4e44ec06 Update listenbrainz.py 2023-12-19 16:55:58 -05:00
Alok Saboo
6a94276af9 Update listenbrainz.py 2023-12-19 16:53:22 -05:00
Alok Saboo
240faaa619 Update listenbrainz.py 2023-12-19 16:51:54 -05:00
Alok Saboo
03888fa5b3 Update listenbrainz.py 2023-12-19 16:49:40 -05:00
Alok Saboo
c99cd85083 Update listenbrainz.py 2023-12-19 16:47:40 -05:00
Alok Saboo
7cae5eb70e Update listenbrainz.py 2023-12-19 16:46:43 -05:00
Alok Saboo
702570f495 Update listenbrainz.py 2023-12-19 16:44:17 -05:00
Alok Saboo
04dc0f6862 Update listenbrainz.py 2023-12-19 16:40:41 -05:00
Alok Saboo
2be00a4d17 Update listenbrainz.py 2023-12-19 16:39:44 -05:00
Alok Saboo
69a0ce6e7d Update listenbrainz.py 2023-12-19 16:36:58 -05:00
Alok Saboo
eeb4c4b5cc Update listenbrainz.py 2023-12-19 16:34:00 -05:00
Alok Saboo
393ff0c7bd Update listenbrainz.py 2023-12-19 15:51:03 -05:00
Alok Saboo
549827a46a Update listenbrainz.py 2023-12-19 15:49:02 -05:00
Alok Saboo
ed98370077 Update listenbrainz.py 2023-12-19 15:48:19 -05:00
Alok Saboo
cb58f32173 Update listenbrainz.py 2023-12-19 15:41:08 -05:00
Alok Saboo
658d1d7340 Update listenbrainz.py 2023-12-19 15:39:10 -05:00
Alok Saboo
a2428f4845 Update listenbrainz.py 2023-12-19 15:38:20 -05:00
Alok Saboo
444fd2e83d Update listenbrainz.py 2023-12-19 15:37:00 -05:00
Alok Saboo
4afd992fbd Update listenbrainz.py 2023-12-19 15:34:06 -05:00
Alok Saboo
b12a59ed58 Update listenbrainz.py 2023-12-19 15:31:12 -05:00
Alok Saboo
0d56ec7232 Update listenbrainz.py 2023-12-19 15:30:19 -05:00
Alok Saboo
969ff61cf9 Update listenbrainz.py 2023-12-19 15:28:10 -05:00
Alok Saboo
7d6c123436 Update listenbrainz.py 2023-12-19 15:18:27 -05:00
Alok Saboo
619fb17383 Update listenbrainz.py 2023-12-19 14:57:44 -05:00
Alok Saboo
2c25076fbf Update listenbrainz.py 2023-12-19 14:55:30 -05:00
Alok Saboo
d4cb8ff654 Create listenbrainz.py 2023-12-19 14:28:46 -05:00
Max Goltzsche
58e5b02929
smartplaylist: add --uri-format option
Beets web API already allows remote players to access audio files but it doesn't provide a way to expose the playlists defined using the smartplaylist plugin.
Now the smartplaylist plugin provides an option to generate ID-based item URIs/URLs instead of paths.
Once playlists are generated this way, they can be served using a regular HTTP server such as nginx.

To provide sufficient flexibility for various ways of integrating beets remotely (e.g. beets API, beets API with context path, AURA API, mopidy resource URI, etc), the new option has been defined as a template with an `$id` placeholder (assuming each remote integration requires a different path schema but they all rely on using the beets item `id` as identifier/path segment).

To prevent local path-related plugin configuration from leaking into a HTTP URL-based playlist generation (invoked with CLI option in addition to the local playlists generated into another directory), setting the new option makes the plugin ignore the other path-related options `prefix`, `relative_to`, `forward_slash` and `urlencode`.

Usage examples:
* `beet splupdate --uri-format 'http://beets:8337/item/$id/file'` (for beets web API)
* `beet splupdate --uri-format 'http://beets:8337/aura/tracks/$id/audio'` (for AURA API)

(While it was already possible to generate playlists containing HTTP URLs previously using the `prefix` option, it did not allow to generate ID-based URLs pointing to the beets web API but required to expose the audio files using a web server directly and refer to them using their file system `$path`.)

Relates to #5037
2023-12-16 05:37:27 +01:00
Max Goltzsche
385c05f98e
smartplaylist: change option --extm3u to --output
The boolean flags `--extm3u` and `--no-extm3u` are replaced with a string option `--output=m3u|m3u8`.
This reduces the amount of options and allows to evolve the CLI to support more playlist output formats in the future (e.g. JSON) without polluting the CLI at that point.
2023-12-16 00:23:03 +01:00
Maxr1998
41719d7b49
advancedrewrite: Apply same rewrite to more corresponding album fields 2023-12-15 17:23:40 +01:00
Adrian Sampson
1efd67cb82
Merge pull request #5044 from Maxr1998/advancedrewrite-rewrite
advancedrewrite: Support simple syntax and improve advanced syntax
2023-12-15 09:34:25 -05:00
Max Goltzsche
222b3a34f9
smartplaylist: expose config as CLI options
Add CLI options to `splupdate` command:
* `--playlist-dir`, `-d`
* `--relative-to`
* `--prefix`
* `--urlencode`
* `--forward-slash`
* `--pretend-paths`
2023-12-15 03:51:27 +01:00
Max Goltzsche
b07a2e42f4
smartplaylist: add extm3u/extinf/m3u8 support
This is to be able to display meaningful metadata and search a playlist within a player without having to load the linked audio files of a playlist.
2023-12-14 01:46:14 +01:00
Maxr1998
304a052dfd
advancedrewrite: Support simple syntax and improve advanced syntax 2023-12-13 14:48:43 +01:00
J0J0 Todos
e5d10004ae
Merge pull request #4807 from doronbehar/mbsubmit-improvements
mbsubmit: Add picard `PromptChoice`
2023-12-06 13:08:20 +01:00
Doron Behar
729a11e211 mbsubmit: Add picard PromptChoice
Make it possible to open picard from the import menu when there are weak
recommendations.
2023-12-05 13:49:03 +02:00
Alok Saboo
4348a49a4f Formatting fixes 2023-12-04 11:38:34 -05:00
Alok Saboo
bdc7de874d Revert code cleanup 2023-12-04 11:37:01 -05:00
Alok Saboo
316b22e9f9 Code cleanup 2023-12-04 11:22:28 -05:00
Alok Saboo
c102505621 Add ConnectionError handling 2023-12-04 10:32:55 -05:00
Adrian Sampson
df2d6ae753
Merge branch 'master' into deezer_error 2023-12-02 13:49:16 -05:00
Alok Saboo
a4ce25fce0 Changed debug logs to error 2023-12-01 12:09:47 -05:00
Alok Saboo
7ffbd040a1 Updated error handling 2023-12-01 08:43:14 -05:00
Alok Saboo
753e4e9a39 Add 502 error handling 2023-11-28 09:58:42 -05:00
Alok Saboo
1a77d9575b Formatting fixes 2023-11-25 10:29:02 -05:00
Alok Saboo
2115f31070 Fix comments 2023-11-25 10:27:29 -05:00
Alok Saboo
e5df18c981 Merge remote-tracking branch 'upstream/master' into deezer_error 2023-11-23 09:40:21 -05:00
Alok Saboo
dee893a7d0 Add helper function and address comments 2023-11-23 09:40:03 -05:00
Alok Saboo
b2fe89d70c formatting fixes 2023-11-22 12:03:33 -05:00
Alok Saboo
33f8ae3e50 Use exception instead of a module in try-except block 2023-11-22 12:02:39 -05:00
Alok Saboo
b4cc654153 Formatting fixes 2023-11-22 11:56:06 -05:00
Alok Saboo
3f68856e58 Lint 2023-11-22 11:54:10 -05:00
Alok Saboo
4cf2c6d3a1 Handle Deezer API errors 2023-11-22 11:52:33 -05:00
Alok Saboo
138216a6bb Update docstring 2023-11-16 12:23:42 -05:00
Alok Saboo
3b707b9276 Update spotify.py 2023-11-15 10:31:20 -05:00
Alok Saboo
e2f83cdf77 Fix typo 2023-11-15 10:24:34 -05:00
Alok Saboo
3b8cb98e6d
Update beetsplug/spotify.py
Co-authored-by: J0J0 Todos <2733783+JOJ0@users.noreply.github.com>
2023-11-15 10:21:53 -05:00
Alok Saboo
c64df0d27a
Update beetsplug/spotify.py
Co-authored-by: J0J0 Todos <2733783+JOJ0@users.noreply.github.com>
2023-11-15 10:21:42 -05:00
Alok Saboo
33944d457b formatting 2023-11-12 09:45:29 -05:00
Alok Saboo
9e1c530c9d also include EAN and UPC 2023-11-12 09:43:59 -05:00
Alok Saboo
e7d86f2fc9 Update spotify.py 2023-11-12 09:40:25 -05:00
Alok Saboo
7952f0a71d Also obtain track ISRC 2023-11-11 21:35:14 -05:00
Alok Saboo
d561ba7793 Add isrc 2023-11-11 21:23:50 -05:00
Alok Saboo
86daa0111c Update spotify.py 2023-11-11 21:02:52 -05:00
jeff
7b0f5fb3f3 Add config option to prefer synced lyrics over plain 2023-11-05 11:26:33 -05:00
jeff
e14982cad7 Add LRCLIB as a provider for the lyrics plugin 2023-11-05 11:26:33 -05:00
wisp3rwind
05383a0dab replaygain: typings
also, minor clean-up (remove unused function after_version, f-string
conversion)
2023-11-05 08:25:39 +01:00
Alok Saboo
c1e91f42df Formatting 2023-11-01 18:12:23 -04:00
Alok Saboo
d4a4934f7a Improve error handling 2023-11-01 17:38:50 -04:00
Adrian Sampson
6655760732
Merge pull request #4974 from fhchl/master 2023-10-26 10:09:07 -04:00
Adrian Sampson
a2d6819276
Merge pull request #4972 from henges/henges/discogs-fetchart
discogs: Populate `cover_art_url` attribute
2023-10-25 14:51:33 -04:00
Leet
eea7c19abc Use gender-neutral language 2023-10-23 17:41:38 -04:00
U-LAPTOP-4EP3DB2K\alexa
5fe19c1d1d PR feedback: fix formatting 2023-10-23 09:47:19 +08:00
fhchl
3e1d496ba1
return empty lists instead of None 2023-10-22 20:46:36 +02:00
U-LAPTOP-4EP3DB2K\alexa
3e06ca2af4 Use images attr over cover_image 2023-10-22 21:51:29 +08:00
U-LAPTOP-4EP3DB2K\alexa
6e88da7298 Merge branch 'master' into henges/discogs-fetchart 2023-10-22 20:48:54 +08:00
U-LAPTOP-4EP3DB2K\alexa
c31146e3f5 Discogs <-> fetchart integration 2023-10-22 20:42:45 +08:00
Serene-Arc
a6e5201ff3 Apply formatting tools to all files
This is 'the big one', which touches every file so that it all conforms
to the given standard.
2023-10-22 09:53:18 +10:00
Alok Saboo
f79fd64aeb Simplify loop and update changelog entry 2023-10-21 16:16:51 -04:00
Alok Saboo
ee42f79b25 Update retry logic 2023-10-21 09:43:01 -04:00
Alok Saboo
66bf0023ea Merge remote-tracking branch 'upstream/master' into spotify_timeout 2023-10-15 09:36:54 -04:00
Maxr1998
9660dd6130
Fix remaining linter warnings 2023-10-14 15:00:57 +02:00
Maxr1998
f809e241ef
Fix linter warnings 2023-10-14 15:00:57 +02:00
Maxr1998
0a4c8e4952
Add advanced rewrite plugin
This plugin allows rewriting fields based on a given library query. This can be helpful, for example, when an artist was renamed but you'd like to keep their older releases under their old name, or if you have a single track from a Various Artists release and want to have it included with the original artist.
2023-10-14 15:00:57 +02:00
Alok Saboo
7fd470a793 resume after reauthentication 2023-10-11 20:39:53 -04:00
Alok Saboo
e064492bd8 additional error handling 2023-10-11 20:37:12 -04:00
Alok Saboo
d9a99ff5f7 add missing space in the log message 2023-10-10 15:42:38 -04:00
Alok Saboo
4b955152c5 change to f-string 2023-10-10 15:22:10 -04:00
Alok Saboo
b69de85d49 Add 429 and 503 error handling 2023-10-10 15:20:29 -04:00
Alok Saboo
989ee5a69c Remove retry logic 2023-10-10 14:49:50 -04:00
Alok Saboo
d87e3e6628 Update error code 2023-10-09 08:59:15 -04:00
Alok Saboo
e68369bc8a Change retry logic 2023-10-07 18:59:02 -04:00
Alok Saboo
97ad4baee4 Update spotify.py 2023-10-07 18:30:03 -04:00
Alok Saboo
d09af885ed Change the log to error 2023-10-07 18:23:16 -04:00
Alok Saboo
36a92381e7 add a default timeout of 30 seconds 2023-10-07 18:22:39 -04:00
Alok Saboo
337e5f4548 gracefully handle Spotify timeout error 2023-10-07 18:19:58 -04:00
AdrienCos
96b89e77f6 Fix the error with CAA where no image would be downloaded when thumbnails are missing 2023-10-07 23:14:03 +02:00
AdrienCos
e7105a9763 Fix the error with CAA where the pre-sized thumbs of release groups would be ignored 2023-10-07 21:25:02 +02:00
Adrian Sampson
b822fe0f5c
Merge pull request #4923 from tandy-1000/autobpm
Add autobpm plugin
2023-10-02 15:56:23 -04:00
tandy1000
7961cf3aaa Add autobpm plugin
This plugin uses librosa to automatically calculate the BPM for a track.
It is based on the keyfinder plugin, and rounds the BPM to an int.

Co-authored-by: Adrian Sampson <adrian@radbox.org>
2023-09-30 16:25:06 +01:00
Kian-Meng Ang
873a91c541 Fix typos
Found via `codespell -S ./test/rsrc,genres.txt -L
caf,fo,ue,searchin,crashers,crasher,te,skool,egal,nothin`
2023-09-25 12:52:26 +08:00
Adrian Sampson
c15ccb16bf
Merge pull request #4900 from fracai/4326-scrub-no-rewrite
4326 scrub should not restore on import if "write" is disabled
2023-09-16 12:47:07 -04:00
Arno Hautala
d8eba458bd use ui.should_write() to control restore during import 2023-09-06 18:50:01 -04:00
J0J0 Todos
4f4e4cdc70 Fix docstring issues in substitute module
to finally make linter happy.
2023-08-31 09:26:42 +02:00
Daniele Ferone
f3f6118b8f Linting fixes in substitute plugin 2023-08-31 08:04:24 +02:00
Daniele Ferone
a4363fb680 Fixes in substitute plugin docs 2023-08-31 08:04:10 +02:00
Daniele Ferone
07c33756b7 _substitute_rules became a class field 2023-08-31 07:08:10 +02:00
Daniele Ferone
249b420b19 Added plugin 2023-08-31 07:07:09 +02:00
Sam Caldwell
b7e3d37c1b feat[embyupdate]: add handling for private users
Adds a `userid` config option for the `embyupdate` plugin. When the
`userid` is provided, the Emby user lookup is bypassed. This avoids a
failure to get the user ID for private users.

Closes: #4402
2023-08-24 18:50:29 -07:00
J0J0 Todos
8d835b8cab Fix ipfs plugin and test_ipfs
by using store(inherit=False) for the creation of a new "ipfs album" as well as
when test_ipfs creates album+items to compare with.
Or put differently: Make ipfs and test_ipfs keep the old store() behaviour for
which the plugin initially was built for.
2023-08-23 06:34:16 +02:00
Adrian Sampson
49846e7851
lyrics: Bypass None values in Google backend
Fixes #4875.
2023-08-13 18:52:39 -04:00
luzpaz
8419149c7a
Fix various typos 2023-08-09 21:26:15 -04:00
Adrian Sampson
7f7db33cf8
Adapt to some recent flake8/pycodestyle changes
As surfaced in this CI run:
https://github.com/beetbox/beets/actions/runs/5716141601/job/15486984755?pr=4866

These all look like perfectly reasonable improvements that are unlikely
to break anything.
2023-07-31 10:00:41 -07:00
J0J0 Todos
342421a36c
Update beetsplug/importfeeds.py
Co-authored-by: Adrian Sampson <adrian@radbox.org>
2023-07-27 20:14:39 +02:00
J0J0 Todos
60227c48f5 Add m3u per session feature to importfeeds plugin 2023-07-27 07:56:14 +02:00
J0J0 Todos
e9f840580a Trigger subsonicupdate on db_change and splupdate
- Trigger subsonicupdate on database_change event instead of only at import
  event.
- Send a new event from smartplaylist plugin whenever lists are updated/created
  and have subsonicupdate plugin listen to it.
- Make sure the both events register a new listener that launches the actual
  subsonic library update at the very end of a beets run (cli_exit) instead of
  during each change (similar to how mpdupdate plugin does it).
2023-07-27 07:41:50 +02:00
J0J0 Todos
871be9c98b Log smartplaylist create msg as info log
instead of debug log. In an explicit run (not while importing) it doesn't hurt
to get some progress to the UI.
2023-07-25 07:52:51 +02:00
J0J0 Todos
c03bd26e3a
Merge pull request #4854 from JOJ0/discogs_single_album_refactor
Support providing album information on singleton imports via Discogs
2023-07-25 06:23:27 +02:00
wisp3rwind
3965858ac1 replaygain: apply review feedback: fixup previous refactor, improve tests
by adding files which are not completely silent, thus hitting a different
code path in some calculations

The sample files were generated using
> sox -n whitenoise.flac synth 00:00:02 whitenoise
> ffmpeg -i whitenoise.flac whitenoise.opus
> ffmpeg -i whitenoise.flac whitenoise.mp3
2023-07-22 12:47:19 +02:00
wisp3rwind
b8be2af11d replaygain: in Gst backend, pass paths instead of items around
This is a preparation for moving the Gst calculation to multiprocessing
worker threads. Passing only the file paths to the worker threads instead of
synchronizing the entire `Item`s (i.e. minimizing the data that is
shared between the processes) hopefully helps to prevent any issues with
this approach.
2023-07-22 12:47:19 +02:00
wisp3rwind
fa37085493 replaygain: in ffmpeg backend refactor album gain calculation
now that we have the `track_results` upfront, some simplifications are
possible
2023-07-22 12:47:19 +02:00
wisp3rwind
76f6c86291 replaygain: in ffmpeg backend, analyse items upfront, then summarize...
...album gains. This is in preparation for parallelizing the track
analysis, and computing the album values in the plugin's "main thread"
once all items are done.
2023-07-22 12:47:19 +02:00
wisp3rwind
545ed6f385 replaygain: log album name for album tasks
doesn't seem to be very useful to log the _list of items_ here
2023-07-22 12:47:19 +02:00
wisp3rwind
7ec7a0d362 replaygain: avoid hasattr in favor of None values
to check for an optional ThreadPool. Seems more idiomatic and readable.
2023-07-22 12:47:19 +02:00
J0J0 Todos
f84b9ea7cf DiscogsPlugin.item_candidates attaches album info
to the TrackInfo objects it returns.

Additionally a new feature is introduced that uses string_dist to find the
correct track on the Discogs album.
2023-07-20 09:12:42 +02:00
J0J0 Todos
0630f4a263 Strip word "vinyl" when searching Discogs
In DiscogsPlugin.get_albums() we already strip away the words "CD" and "disk".
It makes sense to also remove "vinyl"
2023-07-18 08:05:22 +02:00
J0J0 Todos
3debf4edca Fix early exit in Discogs item_candidates method 2023-07-18 07:51:12 +02:00
wisp3rwind
29c21860a9 add missing syspath conversions (2/3, beetsplug) 2023-07-16 10:17:40 +02:00
Alok Saboo
ef8a780e1c Add error handling for invalid Deezer track_id 2023-07-13 09:53:41 -04:00
Alok Saboo
63122da24d remove unused imports 2023-07-10 15:55:42 -04:00
Alok Saboo
c00cdd3cc7 Error handling 2023-07-10 15:52:36 -04:00
Alok Saboo
acd604f102 Update deezer.py 2023-07-10 15:39:28 -04:00
Alok Saboo
a027612216 error handling 2023-07-10 15:34:06 -04:00
Alok Saboo
014d41f208 Error handling 2023-07-10 15:30:20 -04:00
Alok Saboo
6460e4d829 added deezer_updated to keep track of update time 2023-07-09 19:06:04 -04:00
Alok Saboo
a291ec3f0b convert urs to f-string format 2023-07-09 18:43:35 -04:00
Alok Saboo
783ea2a444 Add function to update Deezer rank 2023-07-09 18:39:15 -04:00
Alok Saboo
cdfebdba8e Update deezer.py 2023-07-09 18:02:11 -04:00