-
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
Changes from 2 commits
edd6e7f
6ea1be7
fda740a
1a37db7
c15f1ba
e88a7ce
708d1ab
c1d1388
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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) | ||
|
||
if 'pregap' in medium: | ||
all_tracks.insert(0, medium['pregap']) | ||
|
||
|
@@ -228,7 +232,7 @@ def album_info(release): | |
index, | ||
int(medium['position']), | ||
int(track['position']), | ||
len(medium['track-list']), | ||
total, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. … use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Alas, that would inadvertently count the pregap track. |
||
) | ||
ti.disctitle = disctitle | ||
ti.media = format | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,11 @@ The new features: | |
* :doc:`/plugins/plexupdate`: A new ``library_name`` option allows you to select | ||
which Plex library to update. :bug:`1572` :bug:`1595` | ||
* Add new `include` config option to allow including external config files. | ||
* The importer now supports audio files contained in data tracks when they are | ||
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 commentThe reason will be displayed to describe this comment to others. Learn more. Sounds great! ✨ |
||
|
||
Fixes: | ||
|
||
|
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 namedindex
. Likewise, the corresponding parameter oftrack_info
ismedium_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?