Advertisement
ananas

Lanet IPTV

Dec 31st, 2012
295
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.53 KB | None | 0 0
  1. #! /bin/bash
  2.  
  3. PLAYLIST=${XDG_CACHE_HOME:-~/.cache}/iptv.m3u
  4.  
  5. function open_channel
  6. {
  7.     gst-play -q "$2"
  8. }
  9. export -f open_channel
  10.  
  11. if [[ $1 == "-f" ]]; then
  12.     rm -f $PLAYLIST
  13.     wget -c -q -O $PLAYLIST http://lanet.tv/playlist.m3u || exit 1
  14. fi
  15.  
  16. grep -E "^(#EXTINF|http)" $PLAYLIST | sed "s/#EXTINF.*,//" | \
  17.     yad --list --title="Тель-Авизор" --width=250 --height=500 \
  18.         --button="gtk-close:1" --column="Канал" --column="" --hide-column=2 \
  19.         --dclick-action '/bin/sh -c "open_channel %s"'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement