somebody keeps erasing my changes.

This commit is contained in:
2022-04-29 04:09:38 +03:00
parent 4cd2da271a
commit 623a7d4f97

7
tv.sh
View File

@@ -1,10 +1,13 @@
#!/bin/sh
channel="$(grep tvg-id ~/Gits/ustvgo_to_m3u/ustvgo.m3u | awk '{print $2}' | sed 's/[^"]*"\([^"]*\)".*/\1/' | rofi -dmenu -i -l 20 -p 'Channels')"
PLAYLIST_FILE="/home/konsthol/Gits/ustvgo_to_m3u/ustvgo.m3u"
channel="$(grep tvg-id "$PLAYLIST_FILE" | awk '{print $2}' | sed 's/[^"]*"\([^"]*\)".*/\1/' | rofi -dmenu -i -l 20 -p 'Channels')"
if [[ -n $channel ]]
then
notify-send -t 2000 "Playing "$channel
mpv "$(grep "$channel" ~/Gits/ustvgo_to_m3u/ustvgo.m3u | tail -n 1)"
mpv "$(grep "$channel" "$PLAYLIST_FILE" | tail -n 1)"
else
notify-send "Nothing was chosen"
fi