mirror of
https://github.com/beetbox/beets.git
synced 2026-01-06 16:02:53 +01:00
Merge pull request #3824 from auguste42/master
discogs plugin: fix index_track option
This commit is contained in:
commit
d94fb21bd0
2 changed files with 11 additions and 1 deletions
|
|
@ -505,6 +505,12 @@ class DiscogsPlugin(BeetsPlugin):
|
|||
for subtrack in subtracks:
|
||||
if not subtrack.get('artists'):
|
||||
subtrack['artists'] = index_track['artists']
|
||||
# Concatenate index with track title when index_tracks
|
||||
# option is set
|
||||
if self.config['index_tracks']:
|
||||
for subtrack in subtracks:
|
||||
subtrack['title'] = '{}: {}'.format(
|
||||
index_track['title'], subtrack['title'])
|
||||
tracklist.extend(subtracks)
|
||||
else:
|
||||
# Merge the subtracks, pick a title, and append the new track.
|
||||
|
|
@ -557,7 +563,8 @@ class DiscogsPlugin(BeetsPlugin):
|
|||
title = track['title']
|
||||
if self.config['index_tracks']:
|
||||
prefix = ', '.join(divisions)
|
||||
title = ': '.join([prefix, title])
|
||||
if prefix:
|
||||
title = '{}: {}'.format(prefix, title)
|
||||
track_id = None
|
||||
medium, medium_index, _ = self.get_track_index(track['position'])
|
||||
artist, artist_id = MetadataSourcePlugin.get_artist(
|
||||
|
|
|
|||
|
|
@ -176,6 +176,9 @@ New features:
|
|||
|
||||
Fixes:
|
||||
|
||||
* :bug:`/plugins/discogs`: Fixed a bug with ``index_tracks`` options that
|
||||
sometimes caused the index to be discarded. Also remove the extra semicolon
|
||||
that was added when there is no index track.
|
||||
* :doc:`/plugins/subsonicupdate`: REST was using `POST` method rather `GET` method.
|
||||
Also includes better exception handling, response parsing, and tests.
|
||||
* :doc:`/plugins/the`: Fixed incorrect regex for 'the' that matched any
|
||||
|
|
|
|||
Loading…
Reference in a new issue