yt_sync.py now use global songs and jingles folders
This commit is contained in:
parent
e4f0fba223
commit
8153232f66
@ -5,14 +5,15 @@ import youtube_dl
|
|||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
||||||
script_dir = os.path.dirname(os.path.abspath(__file__))
|
songs_folder = "/songs"
|
||||||
|
jingles_folder = "/jingles"
|
||||||
|
|
||||||
# Radio Bullshit
|
# Radio Bullshit
|
||||||
## parameters for Radio Bullshit playlist
|
## parameters for Radio Bullshit playlist
|
||||||
ydl_parameters = {
|
ydl_parameters = {
|
||||||
"format": "bestaudio/best",
|
"format": "bestaudio/best",
|
||||||
"postprocessors": [{"key": "FFmpegExtractAudio", "preferredcodec": "vorbis"}],
|
"postprocessors": [{"key": "FFmpegExtractAudio", "preferredcodec": "vorbis"}],
|
||||||
"outtmpl": f"{script_dir}/songs/%(title)s.ogg",
|
"outtmpl": f"{songs_folder}/%(title)s.ogg",
|
||||||
"ignoreerrors": True,
|
"ignoreerrors": True,
|
||||||
"restrictfilenames": True,
|
"restrictfilenames": True,
|
||||||
}
|
}
|
||||||
@ -24,7 +25,7 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
# Radio Bullshit Jingles
|
# Radio Bullshit Jingles
|
||||||
## change output path for 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
|
## download
|
||||||
ydl = youtube_dl.YoutubeDL(ydl_parameters)
|
ydl = youtube_dl.YoutubeDL(ydl_parameters)
|
||||||
ydl.extract_info(
|
ydl.extract_info(
|
||||||
|
Loading…
Reference in New Issue
Block a user