forked from Wobbl/Wobuzz
Made it work with relative paths also.
This commit is contained in:
parent
74bff6ea13
commit
b2bd8ef784
4 changed files with 11 additions and 5 deletions
|
@ -1,5 +1,6 @@
|
|||
#!/usr/bin/python3
|
||||
|
||||
import os
|
||||
import sys
|
||||
import argparse
|
||||
|
||||
|
@ -27,7 +28,14 @@ def main():
|
|||
if arguments.track:
|
||||
app.library.temporary_playlist.clear()
|
||||
app.library.temporary_playlist.view.clear()
|
||||
app.library.temporary_playlist.load_from_paths(arguments.track)
|
||||
|
||||
# make track paths absolute
|
||||
tracks = []
|
||||
|
||||
for track in arguments.track:
|
||||
tracks.append(os.path.abspath(track))
|
||||
|
||||
app.library.temporary_playlist.load_from_paths(tracks)
|
||||
app.library.temporary_playlist.view.load_tracks()
|
||||
|
||||
app.player.current_playlist = app.library.temporary_playlist
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue