@@ -67,23 +67,6 @@ msg() {
6767 echo >&2 -e " ${1-} "
6868}
6969
70- # ###############################################################################
71- # create a temporary directory to work in
72- # set the temp_dir and temp_filename variables
73- # ###############################################################################
74- temp_dir=" $( mktemp -d ${SCRIPT_DIR} /tmp.XXXXXX) " ;
75- temp_filename=" ${temp_dir} /yt-dlp-filename" ;
76-
77- # ###############################################################################
78- # for now we only take one argument
79- # TODO: a for loop
80- # ###############################################################################
81- source_url=" ${1} "
82-
83-
84- title_name=" " ;
85-
86-
8770cleanup () {
8871 local -r clean_me=" ${1} " ;
8972
145128
146129check_requirements;
147130
131+ # ###############################################################################
132+ # create a temporary directory to work in
133+ # set the temp_dir and temp_filename variables
134+ # ###############################################################################
135+ temp_dir=" $( mktemp -d ${SCRIPT_DIR} /tmp.XXXXXX) " ;
136+ temp_filename=" ${temp_dir} /yt-dlp-filename" ;
137+
138+ # ###############################################################################
139+ # for now we only take one argument
140+ # TODO: a for loop
141+ # ###############################################################################
142+ source_url=" ${1} "
143+ title_name=" " ;
144+
148145msg " Downloading VOD..." ;
149146
150147# ###############################################################################
@@ -199,6 +196,6 @@ ffmpeg -i "${temp_dir}/${title_name}.vod.mp4" \
199196 -c:s mov_text \
200197 -y " ${title_name} -res.mp4" ;
201198
202- cleanup " ${temp_dir} " ;
199+ # cleanup "${temp_dir}";
203200
204201msg " Done! Your finished file is ready: ${title_name} -res.mp4" ;
0 commit comments