Commit graph

10909 commits

Author SHA1 Message Date
J0J0 Todos
2e5394246f Docs for #4708 2023-03-25 20:51:52 +01:00
J0J0 Todos
348a9fbf13 Changelog for #4708 2023-03-25 20:51:52 +01:00
J0J0 Todos
6acee803f7 Exclude ID's when preserving flexible attributes
- Bandcamp, Spotify, Deezer and Beatport ID's are saved in the library as
  flexible attributes.
- On _reimports_ the method importer.ImportTask.reimport_metadata() takes care
  of preserving existing values for flexible attributes instead of applying new
  (and potentially empty) values.
- In this case we don't want this behaviour and need to make sure that new
  values are applied. Therefore we check whether such ID's of metadata services
  are present in the reimported items and exclude them in reimport_metadata().
2023-03-25 20:51:52 +01:00
J0J0 Todos
fd4cecc29e Make external IDs fetching via MB configurable
- By default no external URLs will be looked for in the 'url-relation-list' of
  the releae dictionary.
- Enabling is possible per each external service.
2023-03-25 20:51:52 +01:00
J0J0 T
6f2c31926e Fetch more external IDs via MusicBrainz
Add retrieval and ID extraction of Bandcamp, Spotify, Deezer and Beatport URLs
while retrieving a MusicBrainz release.
2023-03-25 20:51:16 +01:00
J0J0 T
c2c617594f Save Discogs Release ID via MusicBrainz
- Enable fetching 'url-rels' from the MusicBrainz release endpoint.
- A MusicBrainz release might contain a link to a Discogs release
  which we save to the discogs_albumid attribute of the info object.
- For extraction of the release ID from the Discogs URL, we use the method
  provided in the id_extractors util module.
2023-03-12 12:03:31 +01:00
Adrian Sampson
2e18f84b38
Merge pull request #4698 from ghbrown/discogs_client_check
discogs_client version check
2023-03-10 21:56:48 -08:00
ghbrown
f1b7832d52 Change minimum discogs_client version to 2.3.15 2023-03-10 15:28:29 -06:00
J0J0 Todos
9bc6066517
Merge pull request #4699 from arogl/patch-2
Fix typo in beetsplug/deezer.py
2023-03-10 08:34:55 +01:00
Andrew Rogl
e33369d231
Fix typo in beetsplug/deezer.py
Found another typo
2023-03-10 17:28:52 +10:00
ghbrown
bad541e2c4 Address lint errors for discogs_client version check 2023-03-09 17:38:47 -06:00
ghbrown
566a58c8bb Edit changelog for discogs_client version check 2023-03-09 17:23:42 -06:00
ghbrown
437f6e76e4 Add warning about (python3-)discogs-client version 2023-03-09 17:16:11 -06:00
J0J0 Todos
8ec9f5a09b
Merge pull request #4696 from arogl/patch-1
Fix typo in deezer.py
2023-03-09 13:16:24 +01:00
Andrew Rogl
5662fef842
Fix type in deezer.py 2023-03-09 17:05:03 +10:00
J0J0 Todos
40d27f5522
Merge pull request #4633 from JOJ0/refactor_id_extraction
Refactor metadata source ID extraction utilities
2023-03-08 18:46:33 +01:00
J0J0 Todos
c6746ed399 Add a test for Beatport ID extraction 2023-03-08 18:29:04 +01:00
J0J0 Todos
af600497ee Add a test for Deezer ID extraction 2023-03-08 18:28:41 +01:00
J0J0 Todos
c1299f64a1 Add a test for Spotify metadata ID extraction 2023-03-08 18:22:54 +01:00
J0J0 Todos
c48fa0a830 Fix Discogs ID extractor to support short format
- Often discogs release links used to be written as discogs.com/release/<id>
- Extend one of the existing regex patterns to support that by making the
  trailing dash (-) optional.
- Save a new test regex on regex101.com and update the link to it.
2023-03-08 18:12:31 +01:00
J0J0 Todos
aaa4cfce49 Leave note about Bandcamp IDs in id_extractors module. 2023-03-08 18:12:31 +01:00
J0J0 Todos
f36c55f730 Refactor Beatport plugin to use _get_id
from MetadataSourcePlugin and save beatport_id_regex in id_extractors module.
This streamlines the Beatport release ID extraction magic with plugins Deezer
and Spotify.
2023-03-08 18:12:31 +01:00
J0J0 Todos
8ab25694a5 Move Deezer ID regex to id_extractors module
in beets.util package.
2023-03-08 18:12:31 +01:00
J0J0 Todos
284180ec75 Refactor MetadataSourcePlugin._get_id()
and put to use in Spotify plugin.

- Make _get_id() a staticmethod usable from outside a metadata source plugin.
- id_regex now has to be passed as an argument instead of assuming it is
  accessible via an instance variable (self.id_regex).
- In the Spotify plugin, import spotify_id_regex from util.id_extractors
2023-03-08 18:12:31 +01:00
J0J0 Todos
0175a9aed8 Introduce new module beets.util.id_extractors
- We introduce a new submodule of beets.util named id_extractors.
- Parts of the ID extraction utilites required by metadata source plugins
  should live there.
- Also this enables future usage of those utilities from the "outside" of
  metadata source plugins.
- Move Discogs ID extractor to the new module and change test_discogs to use
  the new location.
- Add spotify_id_regex variable to the new module.
2023-03-08 18:12:31 +01:00
J0J0 Todos
8bbaefbdc9
Merge pull request #4643 from Steffo99/sphinx-deps 2023-03-08 16:58:48 +01:00
Stefano Pigozzi
87c43a0b88
Merge remote-tracking branch 'upstream/master' into sphinx-deps 2023-03-08 13:43:22 +00:00
J0J0 Todos
1f9113af73
Merge pull request #4582 from jpluscplusm/jcm_fix_albumtypes
Store `albumtypes` multi-value field consistently in-DB & in-tag, preventing continual file re-tagging
2023-03-08 14:26:19 +01:00
J0J0 Todos
74ac6c4cdc
Merge pull request #4694 from arsaboo/add_plexsync
Add plexsync plugin
2023-03-08 13:32:25 +01:00
Alok Saboo
033f63ad47 Add Github link 2023-03-07 17:18:15 -05:00
Alok Saboo
4c62673e41 Update index.rst 2023-03-07 17:12:11 -05:00
Adrian Sampson
d63bebb113
Merge pull request #4690 from JOJ0/changelog_note_ordering
Improve "Changelog goes here note" in changelog.rst
2023-03-05 18:52:58 -08:00
J0J0 Todos
6336fef1e8 Improve "Changelog goes here note" in changelog.rst 2023-03-04 19:52:03 +01:00
Adrian Sampson
650f710943
Merge pull request #4686 from arsaboo/spotify_fix
Fix Spotify error - added exception for TypeError [small PR]
2023-03-02 19:27:23 -08:00
Alok Saboo
823599f2b4 Update changelog 2023-02-28 18:18:42 -05:00
Alok Saboo
abf6b1e1f3 Update spotify.py 2023-02-28 09:38:23 -05:00
Alok Saboo
c73ecb89d3 Update spotify.py 2023-02-28 09:36:16 -05:00
J0J0 Todos
4908e1ae09 Fix flake8 issues in test_ui.py
that were introduced in 27218a94.
2023-02-28 09:24:30 +01:00
J0J0 Todos
78853cc9c2 Add note to albumtypes plugin docs about #4528
Add a note to the docs of the albumtypes plugin warning about issue #4528 and
linking to the manual fixing description.
2023-02-28 08:53:21 +01:00
J0J0 Todos
7be1eec762 Rewrite changelog entry for #4583
and include linking to manual fixing tutorial.
2023-02-28 08:51:58 +01:00
J0J0 Todos
93fa19f493 Fix albumtypes plugin and its tests
The new database type DelimitedString does list to string and vice versa
conversions itself.
2023-02-27 13:43:03 +01:00
Jonathan Matthews
27218a9490 Mark albumtype/s expected test failure as fixed 2023-02-27 13:43:03 +01:00
J0J0 Todos
cd52a05d3a Add fix for #4528 to changelog 2023-02-27 13:42:45 +01:00
Jonathan Matthews
7cfc39ea27 Realign with known-working code after review by @mkhl
@mkhl was kind enough to do a drive-by review of my proposed changes,
which I'll include here as the GitHub URI may bit-rot over time (it's
technically
[here](bc21caa0d5),
but that commit isn't part of the `beets` repo, so may get GC'd).

I've encorporated all their proposed changes, as their code is being run
against an existing Beets library, whereas my changes were made as I
tried to set up Beets for the first time - thus I'm inclined to trust
their known-working code more than my own!

This is a review starting at
bc21caa0d5 (diff-d53f73df7f26990645e7bdac865ef86a52b67bafc6fe6ad69890b510a57e2955R210)
(`class DelimeteredString(String):`)

> for context this is the version i'm using now:
>
> ```python
> class DelimitedString(String):
>     model_type = list
>
>     def __init__(self, delimiter):
>         self.delimiter = delimiter
>
>     def format(self, value):
>         return self.delimiter.join(value)
>
>     def parse(self, string):
>         if not string:
>             return []
>         return string.split(self.delimiter)
>
>     def to_sql(self, model_value):
>         return self.delimiter.join(model_value)
> ```
>
> i think 'delimited string' is the correct term here
>
> the rest of the code doesn't seem to use many abbreviations, so calling the property `delimiter` seems appropriate
>
> i don't think a default value for the delimiter makes a lot of sense?
>
> the list comprehension and string conversions in `to_sql` don't seem necessary to me, see above. did you run into trouble without them?
>
> the `from_sql` seems to just be missing functionality from the `Type` parent and seems completely unnecessary
>
> `parse` shouldn't be able to fail because at that point, we've ensured that its argument is actually a string. i also added a `if not string` condition because otherwise the empty list of album types would turn into the list containing the empty string (because that's what split returns)
>
> if we don't define a `format` method here we print the internal python representation of the values (i.e. `['album', 'live']` or somesuch) in the `beet write` output. joining on the delimiter nicely formats the output :)
>
> just so i don't ping you twice unnecessarily, i think it's better to instantiate this type with `'; '` (semicolon space) as the delimiter, because that's what was used before to join the albumtypes and what we'll find in the database

All these changes have been made, including the switch from `;` to
`;<space>` as the in-DB separator.
2023-02-27 13:28:29 +01:00
Jonathan Matthews
af65c6d707 Serialise albumtypes field as a semicolon-based DelimeteredString 2023-02-27 13:28:29 +01:00
Jonathan Matthews
41f9ecc73b Introduce new DB type: DelimeteredString 2023-02-27 13:28:29 +01:00
wisp3rwind
7aa7df2a93 Merge branch 'pr_autotag_typing_fixes' 2023-02-22 20:04:35 +01:00
J0J0 Todos
2b285c72a5
Merge pull request #4636 from trolley/topic/deprecate-acousticbrainz
Deprecate `absubmit` and `acousticbrainz` plugins
2023-02-21 17:42:25 +01:00
Adrian Sampson
1ccad26437
Merge pull request #4678 from beetbox/tutorial-link
Docs: Add a link to the walkthrough from the main tutorial guide
2023-02-20 17:56:45 -08:00
Mark Trolley
55255b0087
Deprecate absubmit and update acousticbrainz plugins
Fixes #4627.

AcousticBrainz is shutting down as of early 2023. Deprecate the absubmit
plugin and update the acousticbrainz plugin to require configuration of
an AcousticBrainz server instance.
2023-02-20 17:42:07 -05:00