diff options
| author | WriterV2 <primary-v2@protonmail.com> | 2026-04-03 22:46:48 +0200 |
|---|---|---|
| committer | WriterV2 <primary-v2@protonmail.com> | 2026-04-03 22:46:48 +0200 |
| commit | a1ec4771740d321df4480e8a7224fa10b59f0569 (patch) | |
| tree | 5e97e8ced79b4fea057fab6e76f80849c053e401 /.config/nushell/youtube.nu | |
Update repo with git init directly in home dir
Diffstat (limited to '.config/nushell/youtube.nu')
| -rw-r--r-- | .config/nushell/youtube.nu | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/.config/nushell/youtube.nu b/.config/nushell/youtube.nu new file mode 100644 index 0000000..c34b21b --- /dev/null +++ b/.config/nushell/youtube.nu @@ -0,0 +1,7 @@ +export def download [video_url: string] { + yt-dlp --cookies-from-browser firefox --downloader aria2c --downloader-args '-c -j 3 -x 3 -s 3 -k 1M' --sponsorblock-mark default --sponsorblock-remove sponsor --restrict-filenames -P $"($env.MISCPATH)/Youtube/" --output '%(channel)s_%(channel_id)s/%(playlist|Misc)s/%(upload_date)s.%(id)s.%(title)s.%(ext)s' $video_url +} + +export def stream [video_url: string] { + yt-dlp --cookies-from-browser firefox --downloader aria2c --downloader-args '-c -j 3 -x 3 -s 3 -k 1M' --sponsorblock-mark default --sponsorblock-remove sponsor $video_url -o - | ffplay - +} |
