Open asafsarid opened 7 years ago
Sure; sounds good! I don't know whether the media file is available from the Beatport API, but if it is, we should capture it.
Actually... it looks like we are trying to use the string "Digital" for $media. I'm not sure why this isn't showing up in your path... https://github.com/beetbox/beets/blob/master/beetsplug/beatport.py#L421
Yes, I saw this as well https://github.com/beetbox/beets/blob/master/beetsplug/beatport.py#L421 Looking at the code seems like it should always be Digital (should it?). Anyway I checked few times to see that my config is fine and the $media variable returns nothing (empty string). While other variables such as catalognum album artist etc are fine.
Hmm; it looks like we only actually apply track-level media information: https://github.com/beetbox/beets/blob/master/beets/autotag/__init__.py#L152
The fault lies with the apply_metadata
function, then, rather than with the beatport
plugin itself. We should totally apply the album-level version of the field too.
Hi, @sampsyo! How to get media information from Beatport release object? I don't see media
field on the api page. Maybe I should use /source-types
method?
Hello again, @tigranl!
I think the idea here is that music downloaded from Beatport is always on digital media—it's the nature of the service. So, re-reading my previous comment, it looks like we just need to take that value of the media
field on AlbumInfo
in apply_metadata
and apply_album_metadata
and transfer it to the newly-imported music. Does that make sense?
It does, but I'm not sure how to set media
field in apply_metadata
. It seems like album_info
already contains media information.
I think we currently have this:
if track_info.media is not None:
item.media = track_info.media
but we should also look for the media
on album_info
, if it exists.
if album_info.media is not None:
item.media = album_info.media
Do you mean this?
Yeah, totally; that looks right to me. 👍 Of course, it would be worth giving it a try with the Beatport plugin enabled...
Unfortunately beets was able to find all my music using only musicbrainz. Is there a way to make the Beatport a default catalogue?
For this sort of thing, I often use the -t
(timid) mode in the importer. That option always lets me manually select the match I want—so if there’s metadata in Beatport, I can select that.
Even using -t
it still matches only Musicbrainz metadata.
Hmm; maybe it would be worth double checking that (a) the plugin is enabled and (b) you’re using an album that exists on Beatport, by searching in its web interface. Otherwise, the verbose log might offer clues about what th plugin is doing.
I don't know what's the problem, but I didn't have any luck in troubleshooting. Anyway, entering ID manually works fine. I tested your idea to look for the media
on album_info
, and it seems that $media variable is still blank.
Cool: manual ID entry sounds great!
That’s mysterious, though—any interesting results from print-debugging in that function?
So, item.media
prints actually give a delivery mechanism (Digital).
Hmm, so it must be lost somewhere along the way. Perhaps it’s time for a PR so other people can give the patch a try?
Problem
When I get a result from beatport, and I want to catch the $media variable in the path section, it is blank, other parameters seems to be ok. For example $data_source is returning Beatport as it should according to https://github.com/beetbox/beets/blob/master/beetsplug/beatport.py#L422
Running this command in verbose (
-vv
) mode:Happening on every album from beatport
Setup
My configuration (output of
beet config
) is: