• R/O
  • SSH

Commit

Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#objective-cqt誰得cocoawindowspythonrubyphpgameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwittertestdombtronvb.netdirectxarduinopreviewerゲームエンジン

Commit MetaInfo

Revision7878ead34396074aecc38e70bc2e1650369a69ec (tree)
Time2018-01-04 03:27:44
AuthorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@fast...>
CommiterJaime Marquínez Ferrándiz

Log Message

Fix playlists that contain path relative to the music directory

Change Summary

Incremental Difference

diff -r cd03cc05fb91 -r 7878ead34396 beetsplug/playersync.py
--- a/beetsplug/playersync.py Tue Dec 26 12:53:57 2017 +0100
+++ b/beetsplug/playersync.py Wed Jan 03 19:27:44 2018 +0100
@@ -80,6 +80,11 @@
8080 paths = [line for line in (line.strip() for line in f) if line and not line.startswith('#')]
8181 items = []
8282 for song_path in paths:
83+ if not os.path.isabs(song_path):
84+ lib_directory = lib.directory
85+ if IS_PY3 and isinstance(lib_directory, bytes):
86+ lib_directory = lib_directory.decode()
87+ song_path = os.path.join(lib_directory, song_path)
8388 query, q_sort = parse_query_parts(['path:' + song_path], Item)
8489 item = list(lib.items(OrQuery(query)))[0]
8590 self.add_item(lib, db, item)