commit 8c82c28

hovercats  ·  2023-11-22 11:20:43 +0000 UTC
parent 4158060
sh/ytdl: remove in favor of rc implementation
1 files changed,  +0, -40
+0, -40
 1@@ -1,40 +0,0 @@
 2-#!/bin/sh -e
 3-
 4-# Simple script to download videos
 5-# Requires yt-dlp
 6-
 7-# Set the download dir
 8-DLDIR="$HOME"/usr/vid
 9-
10-nourl() {
11-    echo "Insert url"
12-    read -r url
13-    dl
14-}
15-
16-ifurl() {
17-    # Check if an url has already been passed
18-   if [ -z "$url" ]; then 
19-       nourl 
20-   else
21-   dl
22-   fi
23-}
24-
25-dl() {
26-       yt-dlp -F "$url"
27-       echo "Select quality. i.e. 248+251 or 22"
28-       read -r quality
29-       exec yt-dlp -P "$DLDIR" -f "$quality" "$url"
30-}
31-
32-proxy() {
33-	ifurl
34-	PROXY="&local=true"
35-	url="$url$PROXY"
36-}
37-
38-case $1 in
39-	-p) url=$2 proxy ;;
40-    *) url=$1 ifurl ;;
41-esac