diff --git a/beetsplug/importfeeds.py b/beetsplug/importfeeds.py index 294a03703..5dd9b06ce 100644 --- a/beetsplug/importfeeds.py +++ b/beetsplug/importfeeds.py @@ -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: diff --git a/docs/changelog.rst b/docs/changelog.rst index d7008e4b5..dc54682af 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -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) ---------------------- diff --git a/docs/plugins/importfeeds.rst b/docs/plugins/importfeeds.rst index bad3742c3..09b831246 100644 --- a/docs/plugins/importfeeds.rst +++ b/docs/plugins/importfeeds.rst @@ -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