You've already forked RadioPlayer
mirror of
https://github.com/radio95-rnt/RadioPlayer.git
synced 2026-02-26 21:53:54 +01:00
respond to -h in cmd line, not in flag
This commit is contained in:
@@ -187,11 +187,6 @@ def parse_arguments():
|
|||||||
pre_track_path = None
|
pre_track_path = None
|
||||||
selected_list = None
|
selected_list = None
|
||||||
|
|
||||||
if can_delete_file("/tmp/radioPlayer_arg"):
|
|
||||||
with open("/tmp/radioPlayer_arg", "r") as f:
|
|
||||||
arg = f.read().strip()
|
|
||||||
os.remove("/tmp/radioPlayer_arg")
|
|
||||||
|
|
||||||
if arg:
|
if arg:
|
||||||
if arg.lower() == "-h":
|
if arg.lower() == "-h":
|
||||||
print("Control files:")
|
print("Control files:")
|
||||||
@@ -206,7 +201,14 @@ def parse_arguments():
|
|||||||
print("\tlist:playlist;options\t-\tPlay custom playlist with options")
|
print("\tlist:playlist;options\t-\tPlay custom playlist with options")
|
||||||
print("\t/path/to/file\t-\tPlay specific file first")
|
print("\t/path/to/file\t-\tPlay specific file first")
|
||||||
exit(0)
|
exit(0)
|
||||||
elif arg.lower() == "n":
|
|
||||||
|
if can_delete_file("/tmp/radioPlayer_arg"):
|
||||||
|
with open("/tmp/radioPlayer_arg", "r") as f:
|
||||||
|
arg = f.read().strip()
|
||||||
|
os.remove("/tmp/radioPlayer_arg")
|
||||||
|
|
||||||
|
if arg:
|
||||||
|
if arg.lower() == "n":
|
||||||
play_newest_first = True
|
play_newest_first = True
|
||||||
print("Newest song will be played first")
|
print("Newest song will be played first")
|
||||||
elif arg.startswith("list:"):
|
elif arg.startswith("list:"):
|
||||||
|
|||||||
Reference in New Issue
Block a user