diff options
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 - +} |
