Jump to content

Special:Badtitle/NS90:Talk:Plasma/Plasma Media Center/Release 1.2/bash support in Plasma Media Center

From KDE Community Wiki
Revision as of 19:58, 20 August 2013 by JJordan (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This may end up being a feature request but should probably be discussed a bit before it gets to that point. Currently I use a cobbed together bash script for my media needs. The script uses Kdialog to dislpay a menu of TV Stations, streaming address and starting locations for locally stored videos and music. PMC has local videos and music reasonably well covered and I like the recent addition of YouTube. The holy grail (for me) of a media center app, that I have never been able to get together, would include live television and web feeds (live and stored). Here is an except of the script I use to watch a local television station (note: you must use the VLC Phonon backend for this to work)

hdhomerun_config 1034AB8D set /tuner1/channel 73 hdhomerun_config 1034AB8D set /tuner1/program 2 dragon --title "KGTV HD" udp://@:1234 2> /dev/null sleep 1 hdhomerun_config 1034AB8D set /tuner1/target udp://192.168.0.20:1234

This uses an hdhomerun tuner but many other types of tuners have command line interfaces

Here is an example of watching a live webcast: dragon --title "Italian tv2000" mms://62.101.89.122/Sat2000

and finally to show the power of this approach a script chunk that pulls a recorded podcast that is updated daily:

vidLink=`wget -q -O- "http://podcastfeeds.nbcnews.com/audio/podcast/MSNBC-NN-NETCAST-M4V.xml" | grep -o '<enclosure url="[^"]*' | grep -o '[^"]*$'` dragon --title="NBC Nightly News" "$vidLink"

Making all this user friendly to set up is a massive job but adding one or more panels to PMC that would look in specific place(s) for scripts and then populate those panels with icons should be much less difficult.

For example: PMC checks to see if I have a ~./tv-channels directory, if it finds one then it displays a TV pane with an entry for each script ending in .tv that it finds there and assigns the icon with the same name. The scripts would likely need to make a dbus call to pass the url to PMC so that another instance is not spawned.

Later, dialog driven aids to set up the scripts could be created.

Hmmm... looks like PMC is hardcoded to use GStreamer.