clean and add yt dl video

This commit is contained in:
Grizouille
2025-11-10 10:56:29 +01:00
parent 45b442efcd
commit 4b4eb94ff7
6 changed files with 51 additions and 22 deletions

View File

@@ -232,11 +232,12 @@ def download_spotify_playlist_and_queue_and_zip(playlist_name, playlist_id, add_
@sched.register_command()
def download_youtubedl_and_queue(video_url, add_to_playlist, uid_user):
def download_youtubedl_and_queue(video_url, add_to_playlist, uid_user, video=False):
check_and_set_download_dirs_exist(uid_user)
filename_absolute = youtubedl_download(video_url,
config["download_dirs"]["youtubedl"],
config["proxy"]["server"])
config["proxy"]["server"],
video)
call_scan(filename_absolute)
update_mpd_db(filename_absolute, add_to_playlist)
return make_song_paths_relative_to_mpd_root([filename_absolute])