|
@@ -364,8 +364,12 @@ def mastodon_bot():
|
|
|
|
|
|
def listtot(res = sys.maxsize):
|
|
|
plt = listplaylist()
|
|
|
- if len(plt) < res:
|
|
|
+ if plt:
|
|
|
+ announcepos = 0
|
|
|
+ else:
|
|
|
announcepos = getlastannounce()
|
|
|
+
|
|
|
+ if len(plt) < res:
|
|
|
for x in listfallback():
|
|
|
if announcepos == 0:
|
|
|
if os.path.exists("announce/repeat.mp3"):
|
|
@@ -373,7 +377,6 @@ def listtot(res = sys.maxsize):
|
|
|
announcepos = ANNOUNCEREPEAT - 1
|
|
|
else:
|
|
|
announcepos = (announcepos - 1)
|
|
|
-
|
|
|
plt.append(x)
|
|
|
return plt[:res]
|
|
|
|
|
@@ -458,7 +461,7 @@ def plaympd():
|
|
|
client.rescan()
|
|
|
|
|
|
#aggiunge l'annuncio iniziale
|
|
|
- addstartannounce()
|
|
|
+ #addstartannounce()
|
|
|
#resetta il lastannounce
|
|
|
setlastannounce(ANNOUNCEREPEAT)
|
|
|
|