diff --git a/ultrasync.sh b/ultrasync.sh index 279ffaa..c76557a 100644 --- a/ultrasync.sh +++ b/ultrasync.sh @@ -1,7 +1,7 @@ #!/bin/bash while true; do - pip3 install -U youtube_dl + pip3 install -U yt-dlp runuser -l zambla -c '/opt/yt_sync.py' || true - sleep 12h + sleep 6h done diff --git a/yt_sync.py b/yt_sync.py index 8ca0dc9..4bfd0fb 100644 --- a/yt_sync.py +++ b/yt_sync.py @@ -1,9 +1,8 @@ #!/usr/bin/env python3 -import youtube_dl +import yt_dlp if __name__ == "__main__": - songs_folder = "/songs" jingles_folder = "/jingles" @@ -17,7 +16,7 @@ if __name__ == "__main__": "restrictfilenames": True, } ## download - ydl = youtube_dl.YoutubeDL(ydl_parameters) + ydl = yt_dlp.YoutubeDL(ydl_parameters) ydl.extract_info( "https://www.youtube.com/playlist?list=PLQC73oq6JtgyYNOeifrJXXzZ1-F0Kgmbg", ) @@ -26,7 +25,7 @@ if __name__ == "__main__": ## change output path for Radio Bullshit jingles ydl_parameters["outtmpl"] = f"{jingles_folder}/%(title)s.godwin" ## download - ydl = youtube_dl.YoutubeDL(ydl_parameters) + ydl = yt_dlp.YoutubeDL(ydl_parameters) ydl.extract_info( "https://www.youtube.com/playlist?list=PLQC73oq6JtgzX8zbHtP5qXKiH6cuanFWi" )