-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Take the audio tracks in a data track into account. #1638
Conversation
Depends on commit 6ec04e6 of `python-musicbrainzngs'.
Looks great! Would you mind adding a note to the changelog? Briefly mentioning that this isn't in the library yet but may be soon would do nicely. |
Hi, Thanks for the prompt feedback! I've just pushed a tentative changelog update. Cheers, |
beets/autotag/mb.py
Outdated
@@ -217,6 +217,10 @@ def album_info(release): | |||
format = medium.get('format') | |||
|
|||
all_tracks = medium['track-list'] | |||
if 'data-track-list' in medium: | |||
all_tracks += medium['data-track-list'] | |||
total = len(all_tracks) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO, total
is not a very good name (total… what?). I would probably just remove that line and…
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had elected to name this variable total
because the track index in the same function is named index
. Likewise, the corresponding parameter of track_info
is medium_total
. Sounded kind of consistent to me. But I don't mind changing its name to anything else which you'd think is more explicit :)
Cheers,
Jérémie.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps something like track_count
would be more descriptive?
Just got a minor nit-pick, otherwise it looks good. ;) |
docs/changelog.rst
Outdated
listed in MusicBrainz: the corresponding audio tracks are now merged into the | ||
main track list. (This feature depends on a new version of the | ||
``musicbrainzngs`` library which is not yet released, but will start working | ||
when it is available.) Thanks to :user:`jdetrey`. :bug:`1638` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds great! ✨
Mmh, just realised that some albums might store music videos in the data track, and that these would then be also listed in the What's beets' actual policy regarding video tracks? I guess some people might not want to have the video files included when importing an album into their music library. I suppose that a possibility would be to add a configuration flag to the importer, specifying whether or not the user wants video files imported as well. What do you think? Cheers, |
Ah, thanks for investigating. The current de facto policy is that beets does not do video files. (For most video formats, we're not anywhere close to being able to read and write metadata, so we can't import them.) Can we, for now, make this exclude video tracks? Then, when we add support for actually interacting with video files, we can enable them. |
What about when you have audio only versions of those video tracks? I tend to always rip out the audio part of the videos and track them together with beets (e.g. on CD+DVD combo releases). Now, usually the videos available in the data track are way below DVD quality, but audio is usually at least up to par with an MP3 download. I could see people wanting to track those as well, especially when a release contains videos for tracks otherwise not already available as audio. |
Sure, sounds reasonable! Let's make it a config option then, under the MusicBrainz section. |
Sounds good to me as well, thanks! But should it be a MusicBrainz-specific option, or a global importer option? Even though only MusicBrainz might currently support indexing of video tracks, it might very well be the case that Discogs or other databases will eventually do so as well. What do you think? Cheers, |
Whoops, sorry, I messed up and closed the PR by mistake. The commit it referenced was jdetrey@edd6e7f. By the way, since #1210 is now fixed, maybe this commit can now be merged? |
Hi! Perhaps you can refresh my memory about the changes, in the context of our work to ignore non-audio tracks by default. For example, do you expect that most users will not notice this change in the default configuration (because we’re now including data tracks, but those data tracks will be ignored because they’re usually marked as non-audio)? If so, can you perhaps run an experiment or two and report on the results? (For example, pasting some importer output from before and after the change would help illustrate why we want this.) Also, it looks like we’ll want an updated changelog entry. 👍 |
Hi! The idea is to allow for releases with audio data tracks, such as 9ce41d09-40e4-4d33-af0c-7fed1e558dba. Without this patch, it is impossible to import such releases: one gets the error Also, importing releases with video data tracks, such as 2db71b51-1389-3ecf-bdfc-934173ce28b2, seems to be working correctly before and after the patch (with The following output was obtained while importing a mock-up of 2db71b51-1389-3ecf-bdfc-934173ce28b2 (that is, 11 MP3 files in a single directory) before the change:
After the change, the output is rigourously the same. Thus, from what I could test, this should not impact users using a default configuration (that is, Cheers! |
Perfect!! Thank you for the explanation—that made it very clear. ✨ Nice work, and thanks for your patience! |
Great! Thank you very much for the feedback and the merge! |
Hi,
On some releases, the data track of the medium (CD, usually) may contain audio/video files which MusicBrainz takes into account as actual tracks in the release. See for instance this release.
Commit 6ec04e6 of jdetrey/python-musicbrainzngs adds support for the corresponding
data-track-list
XML node (as per the MusicBrainz schema). This is pull request #180 of alastair/python-musicbrainzngs.This patch merges the two track lists when importing a release from MusicBrainz.
Comments welcome :)
Cheers,
Jérémie.