|
@@ -13,6 +13,7 @@ import time
|
|
|
import subprocess
|
|
|
import random
|
|
|
import configparser
|
|
|
+from musicpd import MPDClient
|
|
|
|
|
|
from telegram.ext import Updater, MessageHandler, Filters
|
|
|
from mastodon import Mastodon, StreamListener
|
|
@@ -140,7 +141,7 @@ def __normalizetext(s):
|
|
|
return s
|
|
|
|
|
|
|
|
|
-def list():
|
|
|
+def listplaylist():
|
|
|
pl = []
|
|
|
pl2 = []
|
|
|
for udir in sorted(glob(scriptpath + "/playlist/*/")):
|
|
@@ -203,7 +204,7 @@ def listfallback():
|
|
|
|
|
|
|
|
|
def playsingle():
|
|
|
- pl = list()
|
|
|
+ pl = listplaylist()
|
|
|
#print ('\n'.join([x[0] for x in pl]))
|
|
|
|
|
|
if pl:
|
|
@@ -260,7 +261,7 @@ def shufflefallback():
|
|
|
os.rename(file, fname)
|
|
|
|
|
|
def getposition(file):
|
|
|
- pl = list()
|
|
|
+ pl = listplaylist()
|
|
|
try:
|
|
|
return([x[0] for x in pl].index(file) + 1)
|
|
|
except:
|
|
@@ -351,5 +352,8 @@ def mastodon_bot():
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
+
|
|
|
if __name__ == '__main__':
|
|
|
print ("This is a package, use other commands to run it")
|
|
|
+
|