Closed temrix closed 5 years ago
Thanks for the writeup!
musical_key
is not written to the files because it's a flexible attribute that was invented just for the Beatport plugin, so it doesn't have a tag mapping. In retrospect, the right field name to have used is initial_key
, which you'll find (if you grep around in the codebase) is a pre-existing field used by multiple other plugins—namely, keyfinder
and acousticbrainz
. Let's switch to using that instead!
@wualex This is now merged. You can update to the development version by using pip install git+https://github.com/beetbox/beets.git
again. Maybe you have to uninstall the old version by pip uninstall beets
.
@temrix unfortunately the problem persists...
After uninstall & install from git i did the following:
# beet import -s /mnt/d/test/
/mnt/d/test/Alex Niggemann - Bwana (Original Mix).flac
Correcting track tags from:
Alex Niggemann - Bwana (Original Mix)
To: Alex Niggemann - Bwana
URL: https://beatport.com/track/bwana-original-mix/11381810
(Similarity: 93.8%) (title) (Beatport)
[A]pply, More candidates, Skip, Use as-is, Enter search, enter Id, aBort? A
/mnt/d/test/Avidus - Psalm 23.flac
Tagging track: Avidus - Psalm 23
URL: https://beatport.com/track/psalm-23-original-mix/11717455
(Similarity: 100.0%) (Beatport)
/mnt/d/test/Davi - The Gates Of Babylon (Original Mix).flac
Correcting track tags from:
Davi - The Gates Of Babylon (Original Mix)To: DAVI - The Gates Of Babylon
URL: https://beatport.com/track/the-gates-of-babylon-original-mix/6061936
(Similarity: 96.5%) (title) (Beatport)
/mnt/d/test/Kellerkind - Shakti Pan (feat. Sven).flac
Correcting track tags from:
Kellerkind Sven - Shakti Pan (feat. Sven)
To: Kellerkind - Shakti Pan feat. Sven
URL: https://beatport.com/track/shakti-pan-feat-sven-original-mix/8712463
(Similarity: 94.3%) (artist) (Beatport)
[A]pply, More candidates, Skip, Use as-is, Enter search, enter Id, aBort? A
/mnt/d/test/Tunnelvisions - Guava (Extended Mix).flac
Tagging track: Tunnelvisions - Guava (Extended Mix)
URL: https://beatport.com/track/guava-extended-mix/10227696
(Similarity: 100.0%) (Beatport)
And the result....
# beet -vv ls -f '$title - $genre - $bpm - $musical_key'
user configuration: /root/.config/beets/config.yaml
data directory: /root/.config/beets
plugin paths:
Sending event: pluginload
library database: /mnt/d/Music/musiclibrary.db
library directory: /mnt/d/Music
Sending event: library_opened
Bwana - Electro - 123 - $musical_key
Psalm 23 - Electro - 123 - $musical_key
The Gates Of Babylon - Electro - 119 - $musical_key
Shakti Pan feat. Sven - Electro - 121 - $musical_key
Guava (Extended Mix) - Dance - 0 - $musical_key
As you can see, no proper genre/key/bpm
Tried beet bpsync
also but same result
Am I doing something wrong?
musical_key
was renamed to initial_key
because it already existed in the musicbrainz plugin and it even gets written to tags. If you don't use the singleton mode (-s
) it should work.
@sampsyo How exactly does the singleton mode work or where can I look it up?
@temrix it should but...
# beet import /mnt/d/test/
/mnt/d/test (5 items)
Finding tags for album "Avidus - Kellerkind - Fideles".
Candidates:
1. Fideles, Haptic, Kellerkind - Kellerkind, Fideles (57.3%) (tracks, artist, year, ...) (Beatport, Digital, 2016, Stil Vor Talent, SVT183)
2. Sun@Night - Kellerkind (34.5%) (tracks, artist, album, ...) (Digital Media, 2013, XW, Tokabeatz, TB281)
3. Various Artists - Stil Vor Talent Berlin: Alexanderplatz (22.1%) (missing tracks, tracks, album, ...) (Beatport, Digital, 2017, Stil Vor Talent, SVT200)
4. Eternal Nightmare - Kellerkind WEP (20.1%) (missing tracks, tracks, artist, ...) (Digital Media, 2008, XW, KOI Records)
5. Alain Lefèvre - Fidèles Insomnies (20.0%) (tracks, missing tracks, artist, ...) (CD, 2006, CA, Analekta, AN 2 9276)
6. Various Artists - Fidèles au vinyl (16.1%) (tracks, missing tracks, album, ...) (Vinyl, 1993, BE)
7. Les Fils de Teuhpu - Fidèles castors (15.6%) (tracks, missing tracks, album, ...) (CD, 2006, FR, Irfan (le label), FDT004)
8. Westminster Cathedral Choir - Adeste Fideles (14.1%) (missing tracks, tracks, artist, ...) (CD, GB, hyperion, CDA66668)
# selection (default 1), Skip, Use as-is, as Tracks, Group albums,
Enter search, enter Id, aBort? 1
Correcting tags from:
Avidus - Kellerkind - Fideles
To:
Fideles, Haptic, Kellerkind - Kellerkind, Fideles
URL:
https://beatport.com/release/kellerkind-fideles/1909258
(Similarity: 57.3%) (tracks, artist, year, missing tracks) (Beatport, Digital, 2016, Stil Vor Talent, SVT183)
* Guava (Extended Mix) (4:28) -> Wave Echoes (8:00) (title, length)
* Psalm 23 (#2) -> Illumino (#3) (title, index)
* The Gates Of Babylon (Original Mix) (#1) (6:39) -> Subzero (#4) (6:57) (title, index, length)
* Bwana (Original Mix) (#2) -> Take Your Soul (#5) (title, index)
* Shakti Pan (feat. Sven) -> Shakti Pan feat. Sven
Missing tracks (1/6 - 16.7%):
! Vitamins (# 1) (8:21)
Apply, More candidates, Skip, Use as-is, as Tracks, Group albums,
Enter search, enter Id, aBort? T
/mnt/d/test/Alex Niggemann - Bwana (Original Mix).flac
Correcting track tags from:
Alex Niggemann - Bwana (Original Mix)
To:
Alex Niggemann - Bwana
URL:
https://beatport.com/track/bwana-original-mix/11381810
(Similarity: 93.8%) (title) (Beatport)
[A]pply, More candidates, Skip, Use as-is, Enter search, enter Id, aBort? A
/mnt/d/test/Avidus - Psalm 23.flac
Tagging track: Avidus - Psalm 23
URL:
https://beatport.com/track/psalm-23-original-mix/11717455
(Similarity: 100.0%) (Beatport)
/mnt/d/test/Davi - The Gates Of Babylon (Original Mix).flac
Correcting track tags from:
Davi - The Gates Of Babylon (Original Mix)
To:
DAVI - The Gates Of Babylon
URL:
https://beatport.com/track/the-gates-of-babylon-original-mix/6061936
(Similarity: 96.5%) (title) (Beatport)
/mnt/d/test/Kellerkind - Shakti Pan (feat. Sven).flac
Correcting track tags from:
Kellerkind;Sven - Shakti Pan (feat. Sven)
To:
Kellerkind - Shakti Pan feat. Sven
URL:
https://beatport.com/track/shakti-pan-feat-sven-original-mix/8712463
(Similarity: 94.3%) (artist) (Beatport)
[A]pply, More candidates, Skip, Use as-is, Enter search, enter Id, aBort? A
/mnt/d/test/Tunnelvisions - Guava (Extended Mix).flac
Tagging track: Tunnelvisions - Guava (Extended Mix)
URL:
https://beatport.com/track/guava-extended-mix/10227696
(Similarity: 100.0%) (Beatport)
Results the same wrong tagging
# beet -vv ls -f '$title - $genre - $bpm - $initial_key'
user configuration: /root/.config/beets/config.yaml
data directory: /root/.config/beets
plugin paths:
Sending event: pluginload
library database: /mnt/d/Music/musiclibrary.db
library directory: /mnt/d/Music
Sending event: library_opened
Bwana - Electro - 123 - 4a
Psalm 23 - Electro - 123 - 9a
The Gates Of Babylon - Electro - 119 - 5a
Shakti Pan feat. Sven - Electro - 121 - 12a
Guava (Extended Mix) - Dance - 0 -
It is because you selected them as tracks and not as albums when you press T
in the dialog. How is it when you select them as albums, even if they are not albums? Directly select Apply
.
@sampsyo How exactly does the singleton mode work or where can I look it up?
Hi! Anything in particular you're interested in knowing? The idea is pretty straightforward—tracks are tagged one at a time instead of as entire albums.
@temrix if i don't select them as tracks they get the $artist and $title way wrong
# beet import /mnt/d/test/
/mnt/d/test (5 items)
Finding tags for album "Avidus - Kellerkind - Fideles".
Candidates:
1. Fideles, Haptic, Kellerkind - Kellerkind, Fideles (57.3%) (tracks, artist, year, ...) (Beatport, Digital, 2016, Stil Vor Talent, SVT183)
2. Sun@Night - Kellerkind (34.5%) (tracks, artist, album, ...) (Digital Media, 2013, XW, Tokabeatz, TB281)
3. Various Artists - Stil Vor Talent Berlin: Alexanderplatz (22.1%) (missing tracks, tracks, album, ...) (Beatport, Digital, 2017, Stil Vor Talent, SVT200)
4. Eternal Nightmare - Kellerkind WEP (20.1%) (missing tracks, tracks, artist, ...) (Digital Media, 2008, XW, KOI Records)
5. Alain Lefèvre - Fidèles Insomnies (20.0%) (tracks, missing tracks, artist, ...) (CD, 2006, CA, Analekta, AN 2 9276)
6. Les Petits Chanteurs du Mont‐Royal - Adeste Fideles (16.4%) (missing tracks, tracks, artist, ...) (CD, 1990, CA, Analekta, AN 2 9301)
7. Various Artists - Fidèles au vinyl (16.1%) (tracks, missing tracks, album, ...) (Vinyl, 1993, BE)
8. Les Fils de Teuhpu - Fidèles castors (15.6%) (tracks, missing tracks, album, ...) (CD, 2006, FR, Irfan (le label), FDT004)
9. Westminster Cathedral Choir - Adeste Fideles (14.1%) (missing tracks, tracks, artist, ...) (CD, GB, hyperion, CDA66668)
# selection (default 1), Skip, Use as-is, as Tracks, Group albums,
Enter search, enter Id, aBort? 1
Correcting tags from:
Avidus - Kellerkind - Fideles
To:
Fideles, Haptic, Kellerkind - Kellerkind, Fideles
URL:
https://beatport.com/release/kellerkind-fideles/1909258
(Similarity: 57.3%) (tracks, artist, year, missing tracks) (Beatport, Digital, 2016, Stil Vor Talent, SVT183)
* Guava (Extended Mix) (4:28) -> Wave Echoes (8:00) (title, length)
* Psalm 23 (#2) -> Illumino (#3) (title, index)
* The Gates Of Babylon (Original Mix) (#1) (6:39) -> Subzero (#4) (6:57) (title, index, length)
* Bwana (Original Mix) (#2) -> Take Your Soul (#5) (title, index)
* Shakti Pan (feat. Sven) -> Shakti Pan feat. Sven
Missing tracks (1/6 - 16.7%):
! Vitamins (# 1) (8:21)
Apply, More candidates, Skip, Use as-is, as Tracks, Group albums,
Enter search, enter Id, aBort? A
Resulting in:
# beet -vv ls -f '$artist - $title - $genre - $bpm - $initial_key'
user configuration: /root/.config/beets/config.yaml
data directory: /root/.config/beets
plugin paths:
Sending event: pluginload
library database: /mnt/d/Music/musiclibrary.db
library directory: /mnt/d/Music
Sending event: library_opened
Fideles - Wave Echoes - Melodic House & Techno - 124 - Dmin
Fideles - Illumino - Melodic House & Techno - 125 - Emin
Kellerkind - Subzero - Melodic House & Techno - 120 - Cmin
Kellerkind - Take Your Soul - Progressive House - 121 - Emaj
Kellerkind - Shakti Pan feat. Sven - Afro House - 121 - D♭maj
Sending event: cli_exit
So as you can see, they have to be tagged as tracks, otherwise the $artist and $title are waaay wrong... but then the tagging for genre/etc. is not taken from Beatport
Also as kinda of a side issue, i found that it also doesn't get the release date properly, probably not finding it on Musicbrainz/discogs and it's not implemented to get it from Beatport as well 😬 - which would help a lot with electronic music that's not properly tagged otherwise
Can we reopen this @sampsyo, given that it's not actually fixed?
Thanks.
@wualex, hmm, I seem to have lost the thread here. This was originally about musical_key
, and we've addressed that. Is there a way you can summarize exactly what's going on now? Is it something just about singletons mode, for example?
That's the thing, musical_key
is not actually resolved, as i tried to explain in the previous comment.
To summarize, by default the import will mess up the naming & everything for ALL the tracks because it will get the information for the whole album from Beatport, which is/will only (be) correct for the first one If i import them as singletons (as i don't want them grouped by albums anyway), it won't add any info from Beatport
Please see my previous comment: https://github.com/beetbox/beets/issues/3387#issuecomment-541303073 for more info Am i doing something wrong?
Dang, I don’t know why I’m having such trouble understanding the landscape here. Are there two problems then? (Or perhaps more?)
And perhaps a third one also?
musical_key
.If so, can we open separate issues for each specific problem? One big thread with multiple underlying bugs makes it really hard to make plans for fixes.
@sampsyo well, to be honest, to me it looks like the same problem I want to use the tags from Beatport, but it doesn't work either in default/album mode or singleton mode, as i've explained above
If i need to open another issue though for the same problem please let me know.
I'm sorry if I'm being slow; I'm just not able to understand the problems from the information you've provided so far. If you have any way to break it down so I can see exactly what is supposed to happen and what is happening instead, I might be able to make a more informed recommendation.
No worries @sampsyo - i'm sure i don't explain that good either.
So what SHOULD happen is the following files to be tagged on import with the correct genre (at least :) ):
Alex Niggemann - Bwana (Original Mix) (genre should be: Afro House) Avidus - Psalm 23 (genre: Melodic House & Techno) Davi - The Gates Of Babylon (Original Mix) (genre: Tech House) Kellerkind - Shakti Pan (feat. Sven) (genre: Afro House) Tunnelvisions - Guava (Extended Mix) (genre: Afro House)
Trying to achieve that, i did the following:
# beet import /mnt/d/test/
/mnt/d/test (5 items)
Finding tags for album "Avidus - Kellerkind - Fideles".
Candidates:
1. Fideles, Haptic, Kellerkind - Kellerkind, Fideles (57.3%) (tracks, artist, year, ...) (Beatport, Digital, 2016, Stil Vor Talent, SVT183)
2. Sun@Night - Kellerkind (34.5%) (tracks, artist, album, ...) (Digital Media, 2013, XW, Tokabeatz, TB281)
3. Various Artists - Stil Vor Talent Berlin: Alexanderplatz (22.1%) (missing tracks, tracks, album, ...) (Beatport, Digital, 2017, Stil Vor Talent, SVT200)
4. Eternal Nightmare - Kellerkind WEP (20.1%) (missing tracks, tracks, artist, ...) (Digital Media, 2008, XW, KOI Records)
5. Alain Lefèvre - Fidèles Insomnies (20.0%) (tracks, missing tracks, artist, ...) (CD, 2006, CA, Analekta, AN 2 9276)
6. Les Petits Chanteurs du Mont‐Royal - Adeste Fideles (16.4%) (missing tracks, tracks, artist, ...) (CD, 1990, CA, Analekta, AN 2 9301)
7. Various Artists - Fidèles au vinyl (16.1%) (tracks, missing tracks, album, ...) (Vinyl, 1993, BE)
8. Les Fils de Teuhpu - Fidèles castors (15.6%) (tracks, missing tracks, album, ...) (CD, 2006, FR, Irfan (le label), FDT004)
9. Westminster Cathedral Choir - Adeste Fideles (14.1%) (missing tracks, tracks, artist, ...) (CD, GB, hyperion, CDA66668)
# selection (default 1), Skip, Use as-is, as Tracks, Group albums,
Enter search, enter Id, aBort? 1
Correcting tags from:
Avidus - Kellerkind - Fideles
To:
Fideles, Haptic, Kellerkind - Kellerkind, Fideles
URL:
https://beatport.com/release/kellerkind-fideles/1909258
(Similarity: 57.3%) (tracks, artist, year, missing tracks) (Beatport, Digital, 2016, Stil Vor Talent, SVT183)
* Guava (Extended Mix) (4:28) -> Wave Echoes (8:00) (title, length)
* Psalm 23 (#2) -> Illumino (#3) (title, index)
* The Gates Of Babylon (Original Mix) (#1) (6:39) -> Subzero (#4) (6:57) (title, index, length)
* Bwana (Original Mix) (#2) -> Take Your Soul (#5) (title, index)
* Shakti Pan (feat. Sven) -> Shakti Pan feat. Sven
Missing tracks (1/6 - 16.7%):
! Vitamins (# 1) (8:21)
Apply, More candidates, Skip, Use as-is, as Tracks, Group albums,
Enter search, enter Id, aBort? A
What happens is the wrong result Instead of 5 different artists & titles as listed above, beets tagged them all as like being from the album of the first song, with wrong artist names & titles
BUT, as you can see, the genre/bpm/key are tagged correctly from Beatport, but for the wrong tracks :|
# beet -vv ls -f '$artist - $title - $genre - $bpm - $initial_key'
user configuration: /root/.config/beets/config.yaml
data directory: /root/.config/beets
plugin paths:
Sending event: pluginload
library database: /mnt/d/Music/musiclibrary.db
library directory: /mnt/d/Music
Sending event: library_opened
Fideles - Wave Echoes - Melodic House & Techno - 124 - Dmin
Fideles - Illumino - Melodic House & Techno - 125 - Emin
Kellerkind - Subzero - Melodic House & Techno - 120 - Cmin
Kellerkind - Take Your Soul - Progressive House - 121 - Emaj
Kellerkind - Shakti Pan feat. Sven - Afro House - 121 - D♭maj
Now my logic tells me that if with the normal import beets thinks that all tracks are from the same album (i don't get why...) maybe selecting them as tracks would work!
What should happen is the same as point 1, that's why i thought imho it's the same issue
# beet import /mnt/d/test/
/mnt/d/test (5 items)
Finding tags for album "Avidus - Kellerkind - Fideles".
Candidates:
1. Fideles, Haptic, Kellerkind - Kellerkind, Fideles (57.3%) (tracks, artist, year, ...) (Beatport, Digital, 2016, Stil Vor Talent, SVT183)
2. Sun@Night - Kellerkind (34.5%) (tracks, artist, album, ...) (Digital Media, 2013, XW, Tokabeatz, TB281)
3. Various Artists - Stil Vor Talent Berlin: Alexanderplatz (22.1%) (missing tracks, tracks, album, ...) (Beatport, Digital, 2017, Stil Vor Talent, SVT200)
4. Eternal Nightmare - Kellerkind WEP (20.1%) (missing tracks, tracks, artist, ...) (Digital Media, 2008, XW, KOI Records)
5. Alain Lefèvre - Fidèles Insomnies (20.0%) (tracks, missing tracks, artist, ...) (CD, 2006, CA, Analekta, AN 2 9276)
6. Various Artists - Fidèles au vinyl (16.1%) (tracks, missing tracks, album, ...) (Vinyl, 1993, BE)
7. Les Fils de Teuhpu - Fidèles castors (15.6%) (tracks, missing tracks, album, ...) (CD, 2006, FR, Irfan (le label), FDT004)
8. Westminster Cathedral Choir - Adeste Fideles (14.1%) (missing tracks, tracks, artist, ...) (CD, GB, hyperion, CDA66668)
# selection (default 1), Skip, Use as-is, as Tracks, Group albums,
Enter search, enter Id, aBort? T
/mnt/d/test/Alex Niggemann - Bwana (Original Mix).flac
Correcting track tags from:
Alex Niggemann - Bwana (Original Mix)
To:
Alex Niggemann - Bwana
URL:
https://beatport.com/track/bwana-original-mix/11381810
(Similarity: 93.8%) (title) (Beatport)
[A]pply, More candidates, Skip, Use as-is, Enter search, enter Id, aBort? A
/mnt/d/test/Avidus - Psalm 23.flac
Tagging track: Avidus - Psalm 23
URL:
https://beatport.com/track/psalm-23-original-mix/11717455
(Similarity: 100.0%) (Beatport)
/mnt/d/test/Davi - The Gates Of Babylon (Original Mix).flac
Correcting track tags from:
Davi - The Gates Of Babylon (Original Mix)
To:
DAVI - The Gates Of Babylon
URL:
https://beatport.com/track/the-gates-of-babylon-original-mix/6061936
(Similarity: 96.5%) (title) (Beatport)
/mnt/d/test/Kellerkind - Shakti Pan (feat. Sven).flac
Correcting track tags from:
Kellerkind;Sven - Shakti Pan (feat. Sven)
To:
Kellerkind - Shakti Pan feat. Sven
URL:
https://beatport.com/track/shakti-pan-feat-sven-original-mix/8712463
(Similarity: 94.3%) (artist) (Beatport)
[A]pply, More candidates, Skip, Use as-is, Enter search, enter Id, aBort? A
/mnt/d/test/Tunnelvisions - Guava (Extended Mix).flac
Tagging track: Tunnelvisions - Guava (Extended Mix)
URL:
https://beatport.com/track/guava-extended-mix/10227696
(Similarity: 100.0%) (Beatport)
What happens is still not correct As you can see this time beets finds the correct Beatport url for each of the songs, but doesn't write the tags properly
# beet -vv ls -f '$artist - $title - $genre - $bpm - $initial_key'
user configuration: /root/.config/beets/config.yaml
data directory: /root/.config/beets
plugin paths:
Sending event: pluginload
library database: /mnt/d/Music/musiclibrary.db
library directory: /mnt/d/Music
Sending event: library_opened
Alex Niggemann - Bwana - Electro - 123 - 4a
Avidus - Psalm 23 - Electro - 123 - 9a
DAVI - The Gates Of Babylon - Electro - 119 - 5a
Kellerkind - Shakti Pan feat. Sven - Electro - 121 - 12a
Tunnelvisions - Guava (Extended Mix) - Dance - 0 -
To be honest i don't understand how beets works & why if i try to import different tracks from different artists it just assumes they should be from the same album...
Please let me know what other info i can provide or what else i could test to get to the bottom of this.
Now my logic tells me that if with the normal import beets thinks that all tracks are from the same album (i don't get why...)
Aha, yes, this is a good place to start. This is a basic beets idea that's worth reading a bit more about. Start with the autotagger overview, which explains the album situation: http://docs.beets.io/en/stable/guides/tagger.html#overview
To be clear, this is expected behavior—for all metadata matches, including MusicBrainz.
As you can see this time beets finds the correct Beatport url for each of the songs, but doesn't write the tags properly
I see—to summarize, I think the conclusion is that the $genre
, $bpm
, and $initial_key
fields aren't provided in singleton mode? I don't entirely understand why this would be, but the fault might lie with the Beatport API itself—perhaps it just doesn't supply that information for those tracks, or it only supplies those fields for album track listings, not for individually-matched tracks. Might that be the case, @temrix?
In any case, that does seem like a problem, regardless of whether it's on beets's end or on the Beatport end. And it probably does warrant a separate issue.
Problem
Continuation of issue #2080 The beatport plugin fetches genres, bpm and musical_key among others. These should be shown when querying using
beat ls ...
and written into the tags of the music files. However,genre
is not applied,bpm
is correctly applied and written to tags andmusical_key
is applied but not written to tags.During writing this bug report I found that I did not pass the attribute
self.genre
to the hook. This explains whygenre
was not applied but not whymusical_key
is not written to tags.I will issue a pull request resolving the first bug but I don't know why `musicalkey is not written to the tags.
Reproducing
Deleting with a tag editor
genre
andbpm
beforehand.First, we import the album in timid (
-t
) mode:Output:
After that:
genre
is left unaltered but should be changed toGlitch Hop
,bpm
is correct and written to tags,musical_key
is correct and not written to tags.We run this:
Album genre has not changed.
Here's a link to the music files that trigger the bug (if relevant): Simple free download link to files, Creative Commons licensed, and also available in the Beatport catalogue: https://ektoplazm.com/free-music/supersillyus-charade
Setup
My configuration (output of
beet config
) is: