support for downloading youtube/@user urls

This commit is contained in:
Dym Sohin 2023-10-14 21:11:38 +02:00
parent 1556ec4be9
commit cd6ce2d4ff
1 changed files with 26 additions and 15 deletions

41
y.sh
View File

@ -128,23 +128,34 @@ case "$SITE" in
'm.youtube.com'| \ 'm.youtube.com'| \
'youtu.be') 'youtu.be')
echo '> youtube' echo '> youtube'
case "$OPT" in if [[ "$URL" = *youtube\.com\/@* ]]; then
'm') echo '> > store archive'
echo '> > music'
YDL "$URL" -f 251 \ YDL "$URL" -f 251 \
-o "$MUSIC_PATH/%(title).100B [%(id)s].%(ext)s" -o "$YT_PATH/%(uploader_id)s/%(title).100B [%(id)s].%(ext)s"
else
case "$OPT" in
'm')
echo '> > music'
YDL "$URL" -f 251 \
-o "$MUSIC_PATH/%(title).100B [%(id)s].%(ext)s"
;;
'a')
echo '> > audio'
YDL "$URL" -f 251 \
-o "$AUDIO_PATH/%(title).100B [%(id)s].%(ext)s"
;;
's')
echo '> > store archive'
YDL "$URL" -f 251 \
-o "$YT_PATH/%(uploader_id)s/%(title).100B [%(id)s].%(ext)s"
;; ;;
'a') *)
echo '> > audio' echo '> > _video_'
YDL "$URL" -f 251 \ YDL "$URL" \
-o "$AUDIO_PATH/%(title).100B [%(id)s].%(ext)s" -o "$DEFAULT_PATH/yt-%(title).100B [%(id)s].%(ext)s"
;; ;;
*) esac
echo '> > _video_' fi
YDL "$URL" \
-o "$DEFAULT_PATH/yt-%(title).100B [%(id)s].%(ext)s"
;;
esac
;; ;;