cleanup, docs, and changelog for relative_to (#74)

This commit is contained in:
Adrian Sampson 2013-01-22 21:02:41 -08:00
parent b4da79b2e9
commit 0969749e5b
3 changed files with 8 additions and 5 deletions

View file

@ -45,7 +45,7 @@ class ImportFeedsPlugin(BeetsPlugin):
relative_to = self.config['relative_to'].get()
if relative_to:
self.config['relative_to'] = os.path.expanduser(bytestring_path(relative_to))
self.config['relative_to'] = normpath(relative_to)
else:
self.config['relative_to'] = feeds_dir
@ -85,8 +85,9 @@ def _record_items(lib, basename, items):
"""Records relative paths to the given items for each feed format
"""
feedsdir = config['importfeeds']['dir'].as_filename()
relative_to = config['importfeeds']['relative_to'].as_filename()
formats = config['importfeeds']['formats'].as_str_seq()
relative_to = config['importfeeds']['relative_to'].get() \
or config['importfeeds']['dir'].as_filename()
paths = []
for item in items:

View file

@ -28,6 +28,8 @@ It also adds some new features:
:ref:`musicbrainz-config`.
* You can now configure the similarity thresholds used to determine when the
autotagger automatically accepts a metadata match. See :ref:`match-config`.
* :doc:`/plugins/importfeeds`: Added a new configuration option that controls
the base for relative paths used in m3u files.
1.0.0 (in development)
----------------------

View file

@ -10,9 +10,9 @@ To use the plugin, just put ``importfeeds`` on the ``plugins`` line in your
The ``dir`` configuration option can be set to specify another folder
than the default library directory.
the ``relative_to`` configuration option can be set to write the m3u paths
relative to another folder than where the playlist is being written. If you are
using importfeeds to genereate a playlist for mpd, you should set this to the
The ``relative_to`` configuration option can be set to make the m3u paths
relative to another folder than where the playlist is being written. If you're
using importfeeds to generate a playlist for MPD, you should set this to the
root of your music library.
Three different types of outputs coexist, specify the ones you want to use by