Merge pull request #3824 from auguste42/master

discogs plugin: fix index_track option
This commit is contained in:
Adrian Sampson 2021-01-05 17:29:08 -05:00 committed by GitHub
commit d94fb21bd0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View file

@ -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(

View file

@ -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