|
@@ -188,10 +188,14 @@ def playsingle():
|
|
|
firstsong = scriptpath + "/" + pl[0][0]
|
|
|
print (firstsong)
|
|
|
#qui fa play
|
|
|
- subprocess.call(["mplayer", firstsong])
|
|
|
+ subprocess.call(["mplayer", "-nolirc", "-msglevel", "all=0:statusline=5", firstsong])
|
|
|
#alla fine consuma
|
|
|
os.rename(firstsong, scriptpath + "/archive/" + os.path.basename(firstsong))
|
|
|
- with open(os.path.dirname(firstsong) + "/last", "w") as f:
|
|
|
+ #se non ci sono + file cancella la cartella
|
|
|
+ if not glob(os.path.dirname(firstsong) + "/*.m4a"):
|
|
|
+ shutil.rmtree(os.path.dirname(firstsong))
|
|
|
+ else:
|
|
|
+ with open(os.path.dirname(firstsong) + "/last", "w") as f:
|
|
|
f.write(time.strftime("%Y%m%d%H%M%S"))
|
|
|
else:
|
|
|
#usa il fallback
|
|
@@ -202,7 +206,7 @@ def playsingle():
|
|
|
firstsong = plf[0][0]
|
|
|
print (firstsong)
|
|
|
#qui fa play
|
|
|
- subprocess.call(["mplayer", firstsong])
|
|
|
+ subprocess.call(["mplayer", "-nolirc", "-msglevel", "all=0:statusline=5", firstsong])
|
|
|
#alla fine consuma
|
|
|
fname = time.strftime("%Y%m%d%H%M%S") + "|" + "|".join(os.path.basename(firstsong).split("|")[1:])
|
|
|
fname = os.path.dirname(firstsong) + "/" + fname
|