forked from Wobbl/Wobuzz
Made the project also work with "pip install ." (without "-e")
This commit is contained in:
parent
905f157ee0
commit
3685f25882
7 changed files with 24 additions and 16 deletions
|
@ -5,25 +5,29 @@ import argparse
|
|||
from .main import Wobuzz
|
||||
|
||||
|
||||
description = "A music player made by The Wobbler."
|
||||
def main():
|
||||
description = "A music player made by The Wobbler."
|
||||
|
||||
parser = argparse.ArgumentParser(description=description)
|
||||
parser = argparse.ArgumentParser(description=description)
|
||||
|
||||
parser.add_argument("track", nargs="*", help="Plays audio files the from given paths.", metavar="TRACKS")
|
||||
parser.add_argument("-p", "--playlist", help="Imports a playlist from the given path.", metavar="PLAYLIST_PATH")
|
||||
parser.add_argument("track", nargs="*", help="Plays audio files the from given paths.", metavar="TRACKS")
|
||||
parser.add_argument("-p", "--playlist", help="Imports a playlist from the given path.", metavar="PLAYLIST_PATH")
|
||||
|
||||
arguments = parser.parse_args()
|
||||
arguments = parser.parse_args()
|
||||
|
||||
app = Wobuzz()
|
||||
app = Wobuzz()
|
||||
|
||||
if arguments.playlist:
|
||||
app.library.temporary_playlist.load_from_m3u(arguments.playlist)
|
||||
if arguments.playlist:
|
||||
app.library.temporary_playlist.load_from_m3u(arguments.playlist)
|
||||
|
||||
if arguments.track:
|
||||
app.library.temporary_playlist.load_from_paths(arguments.track)
|
||||
if arguments.track:
|
||||
app.library.temporary_playlist.load_from_paths(arguments.track)
|
||||
|
||||
app.player.current_playlist = app.library.temporary_playlist
|
||||
app.library.create_playlist_views()
|
||||
app.player.current_playlist = app.library.temporary_playlist
|
||||
app.library.create_playlist_views()
|
||||
|
||||
sys.exit(app.qt_app.exec())
|
||||
sys.exit(app.qt_app.exec())
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue