@@ -51,30 +51,30 @@ for ITEM in "${DOWNLOADER_ITEMS[@]}"; do
5151 YT_DLP_ARGUMENTS=()
5252 if [[ " $TYPE " == movie ]]; then
5353 YT_DLP_ARGUMENTS=(" ${VIDEO_DEFAULT_ARGUMENTS[@]} " --output \
54- " ${WORKDIR} / %(title)s (%(release_date>%Y,upload_date>%Y)s)\
54+ " %(title)s (%(release_date>%Y,upload_date>%Y)s)\
5555%(format_note& - {}|)s [%(language).2s].%(ext)s" )
5656 elif [[ " $TYPE " == music ]]; then
5757 RUN_FILENAME_SANITIZE=true
5858 RUN_FILEORGANIZER=true
5959 YT_DLP_ARGUMENTS=(" ${AUDIO_DEFAULT_ARGUMENTS[@]} " \
6060 --postprocessor-args " ThumbnailsConvertor+ffmpeg_o:-c:v \
6161 mjpeg -vf crop=\" 'if(gt(ih,iw),iw,ih)':'if(gt(iw,ih),ih,iw)'\" " \
62- --output " ${WORKDIR} / %(creator).80s - %(title)s.%(ext)s" )
62+ --output " %(creator).80s - %(title)s.%(ext)s" )
6363 elif [[ " $TYPE " == musicvideo ]]; then
6464 YT_DLP_ARGUMENTS=(" ${VIDEO_DEFAULT_ARGUMENTS[@]} " --output \
65- " ${WORKDIR} / %(creator).80s - %(title)s.%(ext)s" )
65+ " %(creator).80s - %(title)s.%(ext)s" )
6666 RUN_FILENAME_SANITIZE=true
6767 elif [[ " $TYPE " == news ]]; then
6868 YT_DLP_ARGUMENTS=(" ${VIDEO_DEFAULT_ARGUMENTS[@]} " --output \
69- " ${WORKDIR} / %(release_date>%Y.%m.%d,upload_date>%Y.%m.%d)s \
69+ " %(release_date>%Y.%m.%d,upload_date>%Y.%m.%d)s \
7070%(playlist_title,channel)s - %(title)s \\ [%(language).2s\\ ].%(ext)s" )
7171 elif [[ " $TYPE " == podcast ]]; then
7272 YT_DLP_ARGUMENTS=(" ${AUDIO_DEFAULT_ARGUMENTS[@]} " --output \
73- " ${WORKDIR} / %(release_date>%Y.%m.%d,upload_date>%Y.%m.%d)s \
73+ " %(release_date>%Y.%m.%d,upload_date>%Y.%m.%d)s \
7474%(series,playlist_title,channel)s%(title& - {}|)s [%(language).2s].%(ext)s" )
7575 elif [[ " $TYPE " == series ]]; then
7676 YT_DLP_ARGUMENTS=(" ${VIDEO_DEFAULT_ARGUMENTS[@]} " --output \
77- " ${WORKDIR} / %(series,playlist_title,channel)s S%(season_number|XX)02d\
77+ " %(series,playlist_title,channel)s S%(season_number|XX)02d\
7878E%(episode_number,playlist_index|XX)02d%(title& {}|)s (%(release_date>%Y,upload_date>%Y)s)\
7979%(format_note& - {}|)s [%(language).2s].%(ext)s" )
8080 else
@@ -89,13 +89,14 @@ E%(episode_number,playlist_index|XX)02d%(title& {}|)s (%(release_date>%Y,upload_
8989 --audio-multistream --cache-dir /tmp/yt-dlp/cache --concurrent-fragments 8 \
9090 --convert-thumb jpg --download-archive " ${CONFIG_DIR} /${TYPE} /downloaded.txt" \
9191 --embed-chapters --embed-metadata --embed-subs --embed-thumbnail \
92- --fragment-retries 1000 --retries 100 --retry-sleep 10 \
93- --sub-langs all,-live_chat --trim-filenames " 124" --quiet " $URL " \
92+ --fragment-retries 1000 --paths " home:${WORKDIR} " --paths " temp:${WORKDIR} /yt-dlp" \
93+ --retries 100 --retry-sleep 10 --sub-langs all,-live_chat --trim-filenames " 124" \
94+ --quiet " $URL " \
9495 || EXIT_CODE=$?
9596 if [[ " $EXIT_CODE " != @ (101| 0) ]]; then
9697 echo " Download failed with exit code ${EXIT_CODE} ."
97- rm -f " $WORKDIR " /*
9898 fi
99+ rm --force --recursive " ${WORKDIR} /yt-dlp"
99100 if [[ ! " $( ls -A " $WORKDIR " ) " ]]; then
100101 echo " No new download"
101102 break
0 commit comments