Check streamer is online before watching
This commit is contained in:
parent
091c3632f2
commit
656a9b0cbf
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
file="$(find "$SCRIPTS" "$TSCRIPTS" "$XHELPERSCRIPTS/" -regex ".*\.\(ba\)?sh\$" \
|
||||
file="$(find "$SCRIPTS" "$TSCRIPTS" -regex ".*\.\(ba\)?sh\$" \
|
||||
-type f | sed "s|^$HOME/||" | fzf -i)"
|
||||
[ -z "$file" ] || $EDITOR "$HOME/$file"
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
|
||||
files=$(find "$SCRIPTS/" "$TSCRIPTS/" "$XHELPERSCRIPTS/" -regex ".*\.\(ba\)?sh\$" -type f | sed "s|^$HOME/||")
|
||||
files="${files}\n$(find "$TSCRIPTS/" "$XHELPERSCRIPTS/" -regex ".*\.\(ba\)?sh\$" -type l | sed "s|^$HOME/||")"
|
||||
files=$(find "$SCRIPTS/" "$TSCRIPTS/" -regex ".*\.\(ba\)?sh\$" -type f | sed "s|^$HOME/||")
|
||||
files="${files}\n$(find "$TSCRIPTS/" -regex ".*\.\(ba\)?sh\$" -type l | sed "s|^$HOME/||")"
|
||||
|
||||
# printf "%b\n" "${files}"
|
||||
|
||||
|
|
|
@ -2,5 +2,11 @@
|
|||
|
||||
watch="$(cat $FAV_STREAMERS | rofi -dmenu -matching fuzzy)"
|
||||
|
||||
[ -n "$watch" ] && dash $TSCRIPTS/watch-video-select-format.sh \
|
||||
"https://www.twitch.tv/$watch"
|
||||
[ -n "$watch" ] && {
|
||||
if youtube-dl --get-id "https://www.twitch.tv/$watch"; then
|
||||
dash $TSCRIPTS/watch-video-select-format.sh \
|
||||
"https://www.twitch.tv/$watch"
|
||||
else
|
||||
notify-send "Not Found Streamer:" "$watch"
|
||||
fi
|
||||
}
|
||||
|
|
|
@ -26,4 +26,11 @@ else
|
|||
|
||||
fi
|
||||
|
||||
[ -n "$watch" ] && dash $TSCRIPTS/watch-video-select-format.sh "https://www.twitch.tv/$watch"
|
||||
[ -n "$watch" ] && {
|
||||
if youtube-dl --get-id "https://www.twitch.tv/$watch"; then
|
||||
dash $TSCRIPTS/watch-video-select-format.sh \
|
||||
"https://www.twitch.tv/$watch"
|
||||
else
|
||||
notify-send "Not Found Streamer:" "$watch"
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue