More fixes
This commit is contained in:
parent
9d0bfe095f
commit
be7c9d646e
|
@ -41,7 +41,7 @@ cleanup() {
|
|||
kill "$command_pid" 2>/dev/null
|
||||
rm "$fifo"
|
||||
}
|
||||
trap cleanup TERM
|
||||
trap cleanup TERM INT PIPE
|
||||
|
||||
while read -r line; do
|
||||
kill "$checkpoint_pid"
|
||||
|
|
|
@ -12,13 +12,11 @@ while read -r line; do
|
|||
file=$(echo "$line" | grep 'Destination:')
|
||||
[ -n "$file" ] && {
|
||||
file=$(echo "$file" | cut -d " " -f 3)
|
||||
echo "$file" | grep -q "^$file_prefix" && {
|
||||
echo "$file" | sed -E "s|($file_prefix)([0-9]+)(\..+)?|\2|"
|
||||
|
||||
break
|
||||
}
|
||||
echo "$file" | sed -E "s|($file_prefix)([0-9]+)(\..+)?|\2|"
|
||||
break
|
||||
}
|
||||
done < "$fifo"
|
||||
|
||||
kill "$pid"
|
||||
rm "$fifo"
|
||||
echo "$file" | grep -q "^$file_prefix" && rm "$file"* 2>/dev/null
|
||||
|
|
|
@ -7,13 +7,9 @@ select_format() {
|
|||
|
||||
watch="$1"
|
||||
|
||||
if [ -z $(printf "No\nYes" | dmenu -i -p "Select Format?") ]; then
|
||||
$VIDEOPLAYER "$watch"
|
||||
else
|
||||
if [ "$(printf "No\nYes" | dmenu -i -p "Select Format?")" = "Yes" ]; then
|
||||
format=$(select_format "$watch")
|
||||
if [ -n "$format" ] && [ "$format" = "Yes" ]; then
|
||||
$VIDEOPLAYER_SELECT_YTDLFORMAT$format "$watch"
|
||||
else
|
||||
$VIDEOPLAYER "$watch"
|
||||
fi
|
||||
[ -n "$format" ] && $VIDEOPLAYER_SELECT_YTDLFORMAT$format "$watch"
|
||||
else
|
||||
$VIDEOPLAYER "$watch"
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue