Skip to content

Commit

Permalink
desktop.media.streamdump: restore dry-run option
Browse files Browse the repository at this point in the history
  • Loading branch information
mk-fg committed Jun 5, 2024
1 parent 6aed7e9 commit b887cee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions desktop/media/streamdump
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ slink_opts=( --retry-streams 120 --retry-open 3
slink_fmt=720p,720p60,480p,best
yt_check_interval=3m
yt_check_interval_done=10m
dry_run=

bin=$(basename $0)
usage() {
echo >&2 "Usage: $bin [+runtime] [streamlink-opts] [-- [fmt]] url dump[.mp4]"
echo >&2 "Usage: $bin [+runtime] [-x|--dry-run] [streamlink-opts] [-- [fmt]] url dump[.mp4]"
echo >&2
echo >&2 "Examples:"
echo >&2 " $bin twitch.tv/userX userX-stream1"
Expand All @@ -33,6 +32,7 @@ grep -Pq '(^| -)(h|-help)( |$)' <<< "$*" && usage
set -eo pipefail

[[ "${1:0:1}" != + ]] || { cg_arg=${1:1}; shift; }
[[ "$1" != -x && "$1" != --dry-run ]] && dry_run= || { dry_run=t; shift; }

fmt=$slink_fmt cmd=( streamlink "${slink_opts[@]}" )
while [[ "$#" -gt 2 ]]; do
Expand Down

0 comments on commit b887cee

Please sign in to comment.