beetbox / beets

music library manager and MusicBrainz tagger
http://beets.io/
MIT License
12.87k stars 1.82k forks source link

How to turn off musicbrainz - only use spotify for tagging / candidates? #4605

Open Emporea opened 1 year ago

Emporea commented 1 year ago

I am using the dev git version (1.6.1), thus i should be able to put musicbrainz: enabled: no into my config.yaml. I also added the plugin: spotify option to only use spotify (since I know that almost all of my tracks are on spotify, and musicbrainz fails to recognize 1/3 of my music collection)

This isn't really working since beet import -g or beet import -s still uses musicbrainz. Is there a option to only use Spotify Candidates for Albums / singleton files?

I already tried several options like prefered: media: Spotify and others.

JOJ0 commented 1 year ago

For reference, the PR implementing the feature: https://github.com/beetbox/beets/pull/4319

JOJ0 commented 1 year ago

@Emporea I just read through the feature PR which seems very thoroughly done and reviewed so just doublechecking: How did you install and verify you are using the current state of dev? Maybe post some pip outputs etc just to make sure it's not a kind of python/venv/install whatever oversight.

JOJ0 commented 1 year ago

I realised that singleton imports indeed still fetch from MusicBrainz even if disabled on config..

I'll post details and logs soon!

JOJ0 commented 1 year ago

Chroma enabled:

$ grep musicbrainz: -A2 $BEETSDIR/config.yaml
musicbrainz:
    enabled: no
    source_weight: 0.8
$ beet -vv import -I -p -s -t /remote/data/music-library/Uncategorized/DJ\ Hype\ -\ 0000\ -/* 
user configuration: /home/jojo/.config/remotebeets/config.yaml
data directory: /home/jojo/.config/remotebeets
plugin paths: /home/jojo/git/whatlastgenre/plugin/beets/beetsplug
inline: adding item field disc_and_track
inline: adding item field fmt_onetrack
inline: adding item field fmt_albumtrack
inline: adding item field quality
inline: adding item field fmt_format
inline: adding item field fmt_genre
inline: adding album field is_onetrack
inline: adding album field bitrate
inline: adding album field wehave
inline: adding album field incomplete
artresizer: method is ImageMagick
thumbnails: using ImageMagick to write metadata
thumbnails: using GIO to compute URIs
lastgenre: Loading canonicalization tree ~/git/home_config/lastgenre_conf/genres-tree.yaml
Sending event: pluginload
library database: /home/jojo/.config/remotebeets/remotebeets.db
library directory: /remote/data/music-library
Sending event: library_opened
Sending event: import_begin
Sending event: import_task_created
Sending event: import_task_start
chroma: chroma: fingerprinted b'/remote/data/music-library/Uncategorized/DJ Hype - 0000 -/00 - Dj Hype -  - Extra Hard House Mix (0).mp3'
chroma: matched recordings ['6b113fec-e551-4a05-8982-5f111cec5fef'] on releases ['bc5271e2-d120-4b0d-9d28-ca91d949f930']
Looking up: /remote/data/music-library/Uncategorized/DJ Hype - 0000 -/00 - Dj Hype -  - Extra Hard House Mix (0).mp3
Item search terms: Dj Hype - Extra Hard House Mix
discogs: Searching for master release 22626
discogs: Searching for master release 1319618
discogs: Searching for master release 311959
discogs: Searching for master release 1319618
discogs: searching within album Megarave III - Radioactive Zone
discogs: searching within album Velfarre Vol. 5 - Dance To Infinity
discogs: searching within album Greatest Hits... So Far!!!
discogs: searching within album Velfarre Vol. 5 - Dance To Infinity
discogs: searching within album 20 Years of Toolbox
Sending event: trackinfo_received
Sending event: trackinfo_received
Sending event: trackinfo_received
Sending event: trackinfo_received
Sending event: trackinfo_received
Sending event: trackinfo_received
Sending event: trackinfo_received
Sending event: trackinfo_received
Sending event: trackinfo_received
Sending event: trackinfo_received
Sending event: mb_track_extract
Sending event: trackinfo_received
chroma: acoustid item candidates: 1
Sending event: trackinfo_received
Found 11 candidates.

/remote/data/music-library/Uncategorized/DJ Hype - 0000 -/00 - Dj Hype -  - Extra Hard House Mix (0).mp3
Sending event: before_choose_candidate
Correcting track tags from:
    Dj Hype - Extra Hard House Mix
To:
    Tiga - Man Hrdina (DJ Kicks)
URL:
    https://musicbrainz.org/recording/6b113fec-e551-4a05-8982-5f111cec5fef
(Similarity: 62.3%) (title, artist)
[A]pply, More candidates, Skip, Use as-is, Enter search, enter Id, aBort,
plaY, eDit, edit Candidates?  
JOJ0 commented 1 year ago

Chroma disabled:

$ beet -vv -P chroma import -I -p -s -t /remote/data/music-library/Uncategorized/DJ\ Hype\ -\ 0000\ -/*
user configuration: /home/jojo/.config/remotebeets/config.yaml
data directory: /home/jojo/.config/remotebeets
plugin paths: /home/jojo/git/whatlastgenre/plugin/beets/beetsplug
artresizer: method is ImageMagick
thumbnails: using ImageMagick to write metadata
thumbnails: using GIO to compute URIs
lastgenre: Loading canonicalization tree ~/git/home_config/lastgenre_conf/genres-tree.yaml
inline: adding item field disc_and_track
inline: adding item field fmt_onetrack
inline: adding item field fmt_albumtrack
inline: adding item field quality
inline: adding item field fmt_format
inline: adding item field fmt_genre
inline: adding album field is_onetrack
inline: adding album field bitrate
inline: adding album field wehave
inline: adding album field incomplete
Sending event: pluginload
library database: /home/jojo/.config/remotebeets/remotebeets.db
library directory: /remote/data/music-library
Sending event: library_opened
Sending event: import_begin
Sending event: import_task_created
Sending event: import_task_start
Looking up: /remote/data/music-library/Uncategorized/DJ Hype - 0000 -/00 - Dj Hype -  - Extra Hard House Mix (0).mp3
Item search terms: Dj Hype - Extra Hard House Mix
discogs: Searching for master release 22626
discogs: Searching for master release 1319618
discogs: Searching for master release 311959
discogs: Searching for master release 1319618
discogs: searching within album Megarave III - Radioactive Zone
discogs: searching within album Velfarre Vol. 5 - Dance To Infinity
discogs: searching within album Greatest Hits... So Far!!!
discogs: searching within album Velfarre Vol. 5 - Dance To Infinity
discogs: searching within album 20 Years of Toolbox
Sending event: trackinfo_received
Sending event: trackinfo_received
Sending event: trackinfo_received
Sending event: trackinfo_received
Sending event: trackinfo_received
Sending event: trackinfo_received
Sending event: trackinfo_received
Sending event: trackinfo_received
Sending event: trackinfo_received
Sending event: trackinfo_received
Found 10 candidates.

/remote/data/music-library/Uncategorized/DJ Hype - 0000 -/00 - Dj Hype -  - Extra Hard House Mix (0).mp3
Sending event: before_choose_candidate
Finding tags for track "Dj Hype - Extra Hard House Mix".
Candidates:
1. Franky Jones & DJ Bountyhunter - Speed Area (23.7%) (title, artist, length) (Discogs)
2. Undercover Anarchist - Amman On XTC (Human Resource Remix) (18.3%) (length, title, artist) (Discogs)
3. The Prophet - One, Two, Three, Four ... Do It! (17.0%) (title, length, artist) (Discogs)
4. Lenny Dee - Kenetic Energy Penetrator (14.6%) (title, length, artist) (Discogs)
5. Evil Maniax - Goddamn DJ (DJ Paul Mix) (11.9%) (title, artist, length) (Discogs)
6. Unknown Artist - Intro - Prospective (10.1%) (title, artist, length) (Discogs)
7. Raver's Nature - Day Of Justice (9.9%) (title, length, artist) (Discogs)
8. Ilsa Gold - 4 Blond Nuns (Chicago Remix) (9.7%) (title, artist, length) (Discogs)
9. Genlog - Never Stop This Revolution (9.3%) (title, artist, length) (Discogs)
10. Reanimator - Fuck This (5.0%) (title, artist, length) (Discogs)
# selection (default 1), Skip, Use as-is, Enter search, enter Id, aBort,
eDit, edit Candidates, plaY? 
JOJ0 commented 1 year ago

Maybe this is intentional?

Is it expected behaviour that when chroma is used it fetches from MusicBrainz anyway? (Because otherwise chroma configured with a disabled musicbrainz would fail...)

@snejus did you have that in mind to work like this when you implemented the disabling of MB?

JOJ0 commented 1 year ago

@ghbrown because you mentioned that you often work with MB disabled, I recenctly do that as well often. Can you reproduce this issue/this behaviour? I often see that tracks that are already tagged with MB, still fetch from MB, especially tracks tagged via chroma+MB.

Is it a problem on my end or have you seen it?

snejus commented 1 year ago

Maybe this is intentional?

Is it expected behaviour that when chroma is used it fetches from MusicBrainz anyway? (Because otherwise chroma configured with a disabled musicbrainz would fail...)

@snejus did you have that in mind to work like this when you implemented the disabling of MB?

@JOJ0 I do not use chrome, so unfortunately this never got tested properly.

I will try it out and see what is going with it.

ghbrown commented 1 year ago

@JOJ0 I haven't retagged anything, and I have disabled Musicbrainz from the start, so I don't think I'll have any Musicbrainz stuff in my database.

I can reasonably confidently confirm that if one disables Musicbrainz and imports new singletons while matching to Discogs, there is no interference, results, etc. from Musicbrainz.

snejus commented 1 year ago

Tested a couple of variations of album and singleton import and using chroma - now I remember the intentions behind that change.

musicbrainz:
  enabled: no

disables the data search only. It allows lookups when album and track ids are already resolved (for example, mb_albumid is already in the file metadata). This should have ensured that MB does not take over new music but continues looking after those items in the library that have data_source = "MusicBrainz".

As far as I remember, this should also allow you to import any musicbrainz ID when you pass it into the enter Id option.

This may explain why some singleton imports resolved to musicbrainz - I'd expect it if their metadata contains musicbrainz ids.

Similar story with chroma - which matches audio and outputs specific musicbrainz ids.

If you run beet import -LI some\ album with musicbrainz: enabled: no, you should find that there's only one match from musicbrainz - that specific album.

JOJ0 commented 1 year ago

Thanks for the explanation @snejus that is exactly the behaviour I'm experiencing. Yes if an mbid is present or if a musicbrainz url/Id is entered, MB is still fetched as usual.

I'm not sure if I like this behaviour because:

I would have expected excatly that same behaviour. Do you think that would be possible easily? Or would that break stuff with the "mother of all metadata sources" aka MusicBrainz? ;-)))

JOJ0 commented 1 year ago

I didn't read through https://github.com/beetbox/beets/pull/4319 thoroughly , you might have discussed this behaviour and everything is intentional. will do my homework....later....haha :-)

snejus commented 1 year ago

I see what you mean - I can definitely imagine a use case where I want to reimport/re-tag some of my music if I start using a new data source.

It's possible, but doing it cleanly may require some effort given how deeply the code base is penetrated by musicbrainz :)

JOJ0 commented 1 year ago

I figured that yeah. I wouldnt be brave enough for now haha. Anyways it's a cool feature so thanks!!

PrinzNika commented 1 year ago

so people whats the command and where do i find it in the docs?

Emporea commented 1 year ago

@PrinzNika

You need the dev version (just clone the git repo). Then use these settings:

musicbrainz:
    enabled: no
JOJ0 commented 1 year ago

@PrinzNika some info on dev install options: https://beets.readthedocs.io/en/latest/faq.html#id8

apitofme commented 7 months ago

Found my way here from the related issue #400 as I'm also trying to use a metadata source other than MusicBrainz...

Just to follow up on this, I noticed from #4319 that the branch was merged in to master in March of 2022, but the latest distributed package is still from November 2021. Are there any plans for an updated release in the near future?


I understand it's possible to simply source beets from here on GitHub, only the main website and the 'Getting Started' guide in the docs still suggest using either a distro specific package manager, pip or PyPi so I ... forgot to do that.

Willing to contribute any way that I can (e.g. #3350). I'm (still) not great with Python yet but getting better, and I was planning to create a virtual-environment for beets dev just in case anyway!

apitofme commented 7 months ago

Thank you J0J0 I see the 'enabled' config option now.

Now I just need to get around to sourcing beets from github instead of pip -- I'm not in any immediate rush -- I used the "non-existent local musicbrainz server" hack as a temporary fix

On Sun, 7 Apr 2024, 22:49 J0J0 Todos, @.***> wrote:

so people whats the command and where do i find it in the docs?

You need to switch docs to latest version, it defaults to stable: https://beets.readthedocs.io/en/latest/reference/config.html#id116

— Reply to this email directly, view it on GitHub https://github.com/beetbox/beets/issues/4605#issuecomment-2041619833, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANU7HPA4VNRW6PKFWB6A2DY4G5QLAVCNFSM6AAAAAATJS2PK6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGYYTSOBTGM . You are receiving this because you commented.Message ID: @.***>

Emporea commented 6 months ago

@apitofme

You can still install the github dev version via pip using pip install git+https://github.com/beetbox/beets.git