From 8153232f66efce6f3624cb445d1bd2c623906260 Mon Sep 17 00:00:00 2001 From: Aethor Date: Sat, 12 Jun 2021 12:58:25 +0200 Subject: [PATCH] yt_sync.py now use global songs and jingles folders --- yt_sync.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/yt_sync.py b/yt_sync.py index c97e6da..d627454 100644 --- a/yt_sync.py +++ b/yt_sync.py @@ -5,14 +5,15 @@ import youtube_dl if __name__ == "__main__": - script_dir = os.path.dirname(os.path.abspath(__file__)) + songs_folder = "/songs" + jingles_folder = "/jingles" # Radio Bullshit ## parameters for Radio Bullshit playlist ydl_parameters = { "format": "bestaudio/best", "postprocessors": [{"key": "FFmpegExtractAudio", "preferredcodec": "vorbis"}], - "outtmpl": f"{script_dir}/songs/%(title)s.ogg", + "outtmpl": f"{songs_folder}/%(title)s.ogg", "ignoreerrors": True, "restrictfilenames": True, } @@ -24,7 +25,7 @@ if __name__ == "__main__": # Radio Bullshit Jingles ## change output path for Radio Bullshit jingles - ydl_parameters["outtmpl"] = f"{script_dir}/jingles/%(title)s.ogg" + ydl_parameters["outtmpl"] = f"{jingles_folder}/%(title)s.ogg" ## download ydl = youtube_dl.YoutubeDL(ydl_parameters) ydl.extract_info(