added queue subcommand
This commit is contained in:
parent
c7ec1f9998
commit
e0d5a9c8a9
3
README
3
README
@ -29,6 +29,9 @@ pick file...
|
|||||||
play uri...
|
play uri...
|
||||||
- Plays a video, caching its title first
|
- Plays a video, caching its title first
|
||||||
|
|
||||||
|
queue file...
|
||||||
|
- Queues a playlist
|
||||||
|
|
||||||
verify file...
|
verify file...
|
||||||
- Verifies that all the videos in a playlist are existent on YouTube, and if
|
- Verifies that all the videos in a playlist are existent on YouTube, and if
|
||||||
they aren’t, attempts to replace the URI with one from the Wayback Machine. If
|
they aren’t, attempts to replace the URI with one from the Wayback Machine. If
|
||||||
|
12
yt
12
yt
@ -92,10 +92,13 @@ pick() { # Pick a video to play from a list of videos
|
|||||||
}
|
}
|
||||||
|
|
||||||
play() { # play a video after caching its title
|
play() { # play a video after caching its title
|
||||||
|
cache $@
|
||||||
|
mpv $@
|
||||||
|
}
|
||||||
|
|
||||||
|
queue() {
|
||||||
while test -n "$1"; do
|
while test -n "$1"; do
|
||||||
cache "$1"
|
mpv "$(tr '\n' ' ' <"$1")"
|
||||||
mpv "$1"
|
|
||||||
shift
|
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -188,6 +191,9 @@ case "$com" in
|
|||||||
shift 2>/dev/null || usage 'uri...'
|
shift 2>/dev/null || usage 'uri...'
|
||||||
play "$@"
|
play "$@"
|
||||||
;;
|
;;
|
||||||
|
queue)
|
||||||
|
shift 2>/dev/null || usage 'file...'
|
||||||
|
queue "$@"
|
||||||
verify)
|
verify)
|
||||||
shift 2>/dev/null || usage 'file...'
|
shift 2>/dev/null || usage 'file...'
|
||||||
verify "$@"
|
verify "$@"
|
||||||
|
Loading…
Reference in New Issue
Block a user