Skip to content

Commit

Permalink
fix #245 part 2 removal of common path between playlist and files, al…
Browse files Browse the repository at this point in the history
…ready documented as intended behavior. remove deprecated string_
  • Loading branch information
xjiro authored and phw committed Jan 5, 2024
1 parent d1e6352 commit e9a1a23
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugins/playlist/playlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
PLUGIN_DESCRIPTION = """Generate an Extended M3U playlist (.m3u8 file, UTF8
encoded text). Relative pathnames are used where audio files are in the same
directory as the playlist, otherwise absolute (full) pathnames are used."""
PLUGIN_VERSION = "1.1.1"
PLUGIN_VERSION = "1.2"
PLUGIN_API_VERSIONS = ["2.0"]
PLUGIN_LICENSE = "GPL-2.0-or-later"
PLUGIN_LICENSE_URL = "https://www.gnu.org/licenses/gpl-2.0.html"
Expand Down Expand Up @@ -133,8 +133,8 @@ def callback(self, objs):
if _debug_level > 1:
log.debug("{}: audio_filename: {}, selected dir: {}".format(
PLUGIN_NAME, audio_filename, os.path.dirname(filename)))
if os.path.dirname(filename) == os.path.dirname(audio_filename):
audio_filename = os.path.basename(audio_filename)

audio_filename = os.path.relpath(audio_filename, os.path.dirname(filename))
entry.add(str(audio_filename))

playlist.write()
Expand Down

0 comments on commit e9a1a23

Please sign in to comment.