Fabian42 / bash_scripts

Contains various bash scripts that I have written mainly for myself.
The Unlicense
4 stars 0 forks source link

dl 2.0 #1

Open Fabian42 opened 2 years ago

Fabian42 commented 2 years ago

Complete rewrite of the dl function, triggered by the switch from youtube-dl to yt-dlp. Many more features and complex argument options. Documentation in dl --help.

Todos afterwards: Remove temporary dlp alias and dl-specific variables from .bashrc, remove WIP remark from help.

Fabian42 commented 2 years ago

Give all files the same temporary file name at first and then rename to "$(yt-dlp -o "%(uploader).31s_-_%(title).63s" --restrict-filenames --get-filename $url | sed "s/[\\%\\+\\=\\@\\~\\.]//g;s/(.)/\\l\\1/g")_$(yt-dlp -o "%(id)s.%(ext)s" --get-filename $url)" in --exec. Because the ID is different, this will not result in any conflicts. IDs can contain uppercase characters, but that's better than having wrong IDs, it should not normally cause conflicts anyway.

Fabian42 commented 2 years ago

no/only num arg: -P $HOME/Downloads https://www.youtube.com/playlist?list=$wl_id $1 -P $drive/t http://youtube.com/playlist?list=$tm_id $1 without -m: -f "bv*[height<=?1080]+ba/b[height<=?1080]/22/18" --check-formats --sub-lang "ja,ja-JP,de,de-DE,en-US,en,en-GB" --embed-subs --recode-video mp4 --ppa "VideoConvertor:-crf 1" with -m: -f "ba/b" --check-formats -x --audio-format mp3 --audio-quality 0

Fabian42 commented 2 years ago

announce lengths when expanding playlists and files

Fabian42 commented 2 years ago

check how yt-dlp behaves with channels, potentially add /videos and/or use --playlist-reverse

A: downloads uploads, unknown reordered copy of uploads, all playlists

https://github.com/yt-dlp/yt-dlp/issues/7259

Fabian42 commented 1 year ago

test videos with multiple perspectives, e.g. -B_tWbjFIGI

Fabian42 commented 1 year ago

regex to check if ID could feasibly be from YT, SC, etc. before verifying online (speedup)

Fabian42 commented 1 year ago

print title earlier, "DOWNLOAD" instead of time

Fabian42 commented 1 year ago

If ID finds nothing, retry after first _

Fabian42 commented 1 year ago

Change/add 2..4 syntax

Fabian42 commented 1 year ago

allow script with var for file and folder

Fabian42 commented 1 year ago

https://github.com/yt-dlp/yt-dlp/issues/3405

Fabian42 commented 1 year ago

different sponsor block defaults per channel

Fabian42 commented 7 months ago

romaji: hiragana, katakana, jisho.org kanji, korean, etc.

Fabian42 commented 6 months ago

subtitles FoxReplace

Fabian42 commented 6 months ago

https://github.com/yt-dlp/yt-dlp/issues/1176

Fabian42 commented 6 months ago

check translated title