File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ min_args 1 "$@"
45
45
max_args 2 " $@ "
46
46
47
47
url=" $1 "
48
- filename =" ${2:-% (title)s} .%(ext)s"
48
+ output_filename =" ${2:-% (title)s} .%(ext)s"
49
49
50
50
# "$srcdir/../packages/install_packages_if_absent.sh" yt-dlp ffmpeg
51
51
@@ -87,11 +87,12 @@ yt-dlp \
87
87
--continue \
88
88
--no-overwrite \
89
89
--retries 50 \
90
- --output " $filename " \
90
+ --output " $output_filename " \
91
91
${DEBUG: +--verbose} \
92
92
" $url "
93
93
94
94
if [ " ${2:- } " ]; then
95
+ # quicker and should always be the arg and .mp4 due to the --format options above
95
96
filename=" $2 .mp4"
96
97
else
97
98
# if the filename isn't specified, we can infer it since no filename specified means no path specified so
101
102
# the wrong video
102
103
# "$srcdir/vidopen.sh" "$(ls -t ./*.mp4 | head -n1)"
103
104
timestamp " Determining download filename"
104
- filename=" $( yt-dlp --get-filename --output " $filename " " $url " ) "
105
+ filename=" $( yt-dlp --get-filename --output " $output_filename " " $url " ) "
105
106
fi
106
107
timestamp " Touching file timestamp to make it easier to find when browsing"
107
108
touch " $filename "
You can’t perform that action at this time.
0 commit comments