mirror of
https://github.com/beetbox/beets.git
synced 2025-12-24 09:33:46 +01:00
Merge branch 'master' into beets_500
This commit is contained in:
commit
5bddb6dddc
3 changed files with 21 additions and 2 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(
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ from __future__ import division, absolute_import, print_function
|
|||
import mpd
|
||||
import socket
|
||||
import select
|
||||
import sys
|
||||
import time
|
||||
import os
|
||||
|
||||
|
|
@ -52,7 +53,13 @@ class MPDClientWrapper(object):
|
|||
self.music_directory = (
|
||||
mpd_config['music_directory'].as_str())
|
||||
|
||||
self.client = mpd.MPDClient(use_unicode=True)
|
||||
if sys.version_info < (3, 0):
|
||||
# On Python 2, use_unicode will enable the utf-8 mode for
|
||||
# python-mpd2
|
||||
self.client = mpd.MPDClient(use_unicode=True)
|
||||
else:
|
||||
# On Python 3, python-mpd2 always uses Unicode
|
||||
self.client = mpd.MPDClient()
|
||||
|
||||
def connect(self):
|
||||
"""Connect to the MPD.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -290,6 +293,8 @@ Fixes:
|
|||
:bug:`2242`
|
||||
* :doc:`plugins/replaygain`: Disable parallel analysis on import by default.
|
||||
:bug:`3819`
|
||||
* :doc:`/plugins/mpdstats`: Fix Python 2/3 compatibility
|
||||
:bug:`3798`
|
||||
* Fix :bug:`3308` by using browsing for big releases to retrieve additional
|
||||
information. Thanks to :user:`dosoe`.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue