From 48b9809cae71e836077fc8af6c839baae89ecd8e Mon Sep 17 00:00:00 2001 From: ugrnm Date: Sun, 9 Oct 2022 17:30:55 +0200 Subject: [PATCH] generate playlist and reload it --- download_loooooops.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/download_loooooops.py b/download_loooooops.py index 6f734eb..b68b84e 100755 --- 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`') +