diff options
author | J0J0 Todos <jojo@peek-a-boo.at> | 2023-04-02 13:22:09 +0200 |
---|---|---|
committer | J0J0 Todos <jojo@peek-a-boo.at> | 2023-04-02 19:34:13 +0200 |
commit | 86929eb6a01407e48bf511a0bc63d32508f10b59 (patch) | |
tree | 6f8b02924b2f3ff4c4c98861a72f37ce8e251d10 | |
parent | 16e361baf3f9f68dd396c604c427830c93086efb (diff) |
convert: playlist: Adapt code comments
- Remove initial comment around playlist entry condition (which is better
suited for user docs anyway, and stated there already)
- Add explanation above the items_paths playlist contents creation list
comprehension.
-rw-r--r-- | beetsplug/convert.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/beetsplug/convert.py b/beetsplug/convert.py index 374b68e74..ef6865597 100644 --- a/beetsplug/convert.py +++ b/beetsplug/convert.py @@ -476,16 +476,13 @@ class ConvertPlugin(BeetsPlugin): link, hardlink, threads, items) if playlist: - # When playlist arg is passed create an m3u8 file in dest folder. - # - # The classic m3u format doesn't support special characters in - # media file paths, thus we use the m3u8 format which requires - # media file paths to be unicode. Additionally we use relative - # paths to ensure readability of the playlist on remote - # computers. + # Playlist paths are understood as relative to the dest directory. pl_normpath = util.normpath(playlist) pl_dir = os.path.dirname(pl_normpath) self._log.info("Creating playlist file {0}", pl_normpath) + # Generates a list of paths to media files, ensures the paths are + # relative to the playlist's location and translates the unicode + # strings we get from item.destination to bytes. items_paths = [ os.path.relpath(util.bytestring_path(item.destination( basedir=dest, path_formats=path_formats, fragment=False |