Browse Source

Improved listtot

itec78 3 years ago
parent
commit
70b5d259cb
1 changed files with 5 additions and 4 deletions
  1. 5 4
      playlistalo.py

+ 5 - 4
playlistalo.py

@@ -378,8 +378,9 @@ def listtot(res = sys.maxsize):
             else:
                 announcepos = (announcepos - 1)
             plt.append(x)
-    return plt[:res]
-
+        return plt[:res]
+    else:
+        return plt
 
 def getlastannounce():
     announcepos = ANNOUNCEREPEAT
@@ -526,8 +527,8 @@ def mpdclean(client):
         consume(song)
         client.delete(0)
         #e pulisce anche in mpd
-        #if os.path.exists("mpd/" + song):
-        #    os.remove("mpd/" + song)
+        if os.path.exists("mpd/" + song):
+            os.remove("mpd/" + song)
         #se non ci sono + file cancella la cartella
         if not glob(os.path.dirname("mpd/" + song) + "/*"):
             shutil.rmtree(os.path.dirname("mpd/" + song))