Merge branch 'master' into RobustCaseSensitiveDetection

# Conflicts:
#	docs/changelog.rst
This commit is contained in:
Malte Ried 2015-09-08 15:57:42 +02:00
commit 951a11809f
5 changed files with 18 additions and 8 deletions

View file

@ -117,8 +117,3 @@ match:
required: []
track_length_grace: 10
track_length_max: 30
thumbnails:
force: no
auto: yes
dolphin: no

View file

@ -40,6 +40,7 @@ class PlayPlugin(BeetsPlugin):
'use_folders': False,
'relative_to': None,
'raw': False,
'warning_treshold': 100,
})
def commands(self):
@ -64,6 +65,7 @@ class PlayPlugin(BeetsPlugin):
use_folders = config['play']['use_folders'].get(bool)
relative_to = config['play']['relative_to'].get()
raw = config['play']['raw'].get(bool)
warning_treshold = config['play']['warning_treshold'].get(int)
if relative_to:
relative_to = util.normpath(relative_to)
@ -105,7 +107,7 @@ class PlayPlugin(BeetsPlugin):
return
# Warn user before playing any huge playlists.
if len(selection) > 100:
if warning_treshold and len(selection) > warning_treshold:
ui.print_(ui.colorize(
'text_warning',
'You are about to queue {0} {1}.'.format(len(selection),

View file

@ -711,7 +711,13 @@ class AudioToolsBackend(Backend):
# of the track.
# Note that the method needs an audiotools.PCMReader instance that can
# be obtained from an audiofile instance.
rg_track_gain, rg_track_peak = rg.title_gain(audiofile.to_pcm())
try:
rg_track_gain, rg_track_peak = rg.title_gain(audiofile.to_pcm())
except ValueError as exc:
# `audiotools.replaygain` can raise a `ValueError` if the sample
# rate is incorrect.
self._log.debug('error in rg.title_gain() call: {}', exc)
raise ReplayGainError('audiotools audio data error')
self._log.debug(u'ReplayGain for track {0} - {1}: {2:.2f}, {3:.2f}',
item.artist, item.title, rg_track_gain, rg_track_peak)

View file

@ -18,6 +18,8 @@ The new features:
* :doc:`/plugins/embedart`: A new ``remove_art_file`` option lets you clean up
if you prefer *only* embedded album art. Thanks to :user:`jackwilsdon`.
:bug:`1591` :bug:`733`
* :doc:`/plugins/play`: You can now configure the number of tracks that
trigger a "lots of music" warning. :bug:`1577`
Fixes:
@ -39,6 +41,8 @@ Fixes:
* Date fields are now written in the correct order (year-month-day), which
eliminates an intermittent bug where the latter two fields would not get
written to files. Thanks to :user:`jdetrey`. :bug:`1303` :bug:`1589`
* :doc:`/plugins/replaygain`: Avoid a crash when the PyAudioTools backend
encounters an error. :bug:`1592`
* The check whether the file system is case sensitive or not could lead to
wrong results. It is much more robust now.

View file

@ -38,7 +38,7 @@ configuration file. The available options are:
- **command**: The command used to open the playlist.
Default: ``open`` on OS X, ``xdg-open`` on other Unixes and ``start`` on
Windows. Insert ``{}`` to make use of the ``--args``-feature.
- **relative_to**: Emit paths relative to base directory.
- **relative_to**: If set, emit paths relative to this directory.
Default: None.
- **use_folders**: When using the ``-a`` option, the m3u will contain the
paths to each track on the matched albums. Enable this option to
@ -47,6 +47,9 @@ configuration file. The available options are:
- **raw**: Instead of creating a temporary m3u playlist and then opening it,
simply call the command with the paths returned by the query as arguments.
Default: ``no``.
- **warning_treshold**: Set the minimum number of files to play which will
trigger a warning to be emitted. If set to ``no``, warning are never issued.
Default: 100.
Optional Arguments
------------------