Compare commits
No commits in common. "7797c47195b6c2298da26132edc426ad508a8440" and "f67691e8d7d71caff6b8ba655b10778af715629d" have entirely different histories.
7797c47195
...
f67691e8d7
199
yt
199
yt
@ -27,22 +27,14 @@ test -n "$YT_PL_DIR" \
|
|||||||
|| test -n "$XDG_DATA_HOME" && YT_PL_DIR="$XDG_DATA_HOME/yt" \
|
|| test -n "$XDG_DATA_HOME" && YT_PL_DIR="$XDG_DATA_HOME/yt" \
|
||||||
|| YT_PL_DIR="$HOME/.local/share/yt"
|
|| YT_PL_DIR="$HOME/.local/share/yt"
|
||||||
|
|
||||||
test -d "$YT_PL_DIR" \
|
|
||||||
|| mkdir -p "$YT_PL_DIR"
|
|
||||||
|
|
||||||
# formatted $YT_PL_DIR for use with sed
|
|
||||||
P="$(printf '%s\n' "$YT_PL_DIR" | sed 's;\/;\\/;g')"
|
|
||||||
|
|
||||||
argv0="$0"
|
argv0="$0"
|
||||||
com="$1"
|
com="$1"
|
||||||
u='add | archive | clone | list | new | pick | play | search | sync | verify'
|
|
||||||
FMT='%(title)s – %(channel)s (%(duration>%H:%M:%S)s) [%(webpage_url)s]'
|
FMT='%(title)s – %(channel)s (%(duration>%H:%M:%S)s) [%(webpage_url)s]'
|
||||||
WBAPI='https://archive.org/wayback/available?url='
|
WBAPI='https://archive.org/wayback/available?url='
|
||||||
|
|
||||||
|
|
||||||
add() { # adds a video to a playlist file
|
add() { # adds a video to a playlist file
|
||||||
test -z "$2" || test -n "$3" && usage 'add uri playlist'
|
|
||||||
|
|
||||||
while test -f "$YT_PL_DIR/$2.m3u"; do
|
while test -f "$YT_PL_DIR/$2.m3u"; do
|
||||||
file="$YT_PL_DIR/$2.m3u"
|
file="$YT_PL_DIR/$2.m3u"
|
||||||
video="$(printf '%s\n' "$1" \
|
video="$(printf '%s\n' "$1" \
|
||||||