Xfce Wiki

Sub domains
 

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
midori:webmedia_now-playing [2015/01/05 22:37] – [Some examples] jamesaxlmidori:webmedia_now-playing [2015/01/24 00:46] – [Using Shell script] jamesaxl
Line 29: Line 29:
         }         }
     ')     ')
-echo "You are now playing: $ARTIST - $TITLE"+echo "You are now playing: $VideoTitle - $VideoUri"
 </code> </code>
 As you see **mediaHerald** is a Dbus service that extension created to store video's title and uri.\\ As you see **mediaHerald** is a Dbus service that extension created to store video's title and uri.\\
Line 60: Line 60:
 } }
 </code> </code>
-Result :\\+**Result:**\\
 <code> <code>
 you are playing ‪Midori 0.5.8 : A Fast and Lightweight Web Browser For Linux Mint - YouTube, follow me on https://www.youtube.com/watch?v=O2cebaY5Wlc you are playing ‪Midori 0.5.8 : A Fast and Lightweight Web Browser For Linux Mint - YouTube, follow me on https://www.youtube.com/watch?v=O2cebaY5Wlc
 </code> </code>
-**Python let's make more short 8-)**+**Python let's make it more short 8-)**
 <code> <code>
 import dbus import dbus
Line 71: Line 71:
 props_iface = dbus.Interface(service, 'org.freedesktop.DBus.Properties') props_iface = dbus.Interface(service, 'org.freedesktop.DBus.Properties')
 properties = props_iface.GetAll('org.midori.mediaHerald') properties = props_iface.GetAll('org.midori.mediaHerald')
-print "You are playing %s, follow me %s" %(properties.get("VideoTitle")[1:], properties.get("VideoUri")[1:])+print "You are playing %s, follow me %s" %(properties.get("VideoTitle")[1:], properties.get("VideoUri")[0:])
 </code> </code>
 **Result:**\\ **Result:**\\