commit 48b9809cae71e836077fc8af6c839baae89ecd8e
parent 10663ebb2be3ecf08abf73ab8ede331364ee282a
Author: ugrnm <ultrageranium@bleu255.com>
Date: Sun Oct 9 17:30:55 +0200
generate playlist and reload it
Diffstat:1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/download_loooooops.py b/download_loooooops.py
@@ -2,10 +2,8 @@
import requests
from time import sleep
-import datetime
-import os
+import datetime, shutil, os
from urllib.parse import urlparse
-import shutil
#def download_media(dir, url):
# remote_url
@@ -96,3 +94,8 @@ for l in looooops:
grab_media(path, url)
+# Once we've done everythin we generate a playlist and ask ezstream
+# to reload it
+os.system('find . -iname "*mp3" > playlist_loooooops.m3u'\
+ '&& kill -s HUP `pidof ezstream`')
+