Fixed listtot
This commit is contained in:
parent
e47d45dbaa
commit
4810d6945d
1 changed files with 6 additions and 3 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue