diff --git a/youtube.sh b/youtube.sh index 517ca59..bdb8c2a 100755 --- a/youtube.sh +++ b/youtube.sh @@ -35,6 +35,20 @@ if [[ "$folders" != "n" ]]; then output_template="-o %(channel)s/%(title)s.%(ext)s" fi +# Abfrage für Download-Archiv +read -p "Download-Archiv verwenden? [Y/n] " use_archive +if [[ "$use_archive" != "n" ]]; then + read -p "Dateiname für Download-Archiv angeben [download-archive.txt]: " archive_file + archive_file=${archive_file:-download-archive.txt} + archive_cmd="--download-archive $archive_file" +fi + +# Abfrage für Playlist-Start +read -p "Ab welchem Playlist-Eintrag soll heruntergeladen werden? [Standard: 1]: " playlist_start +if [[ -n "$playlist_start" ]]; then + playlist_start_cmd="--playlist-start $playlist_start" +fi + # Format-Spezifikationen case "$format" in opus) @@ -93,6 +107,8 @@ yt-dlp \ $format_cmd \ $audio \ $quality \ + ${archive_cmd} \ + ${playlist_start_cmd} \ -v \ "$url" \ ${extra}