Kodi Community Forum
Adding Active Media - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+--- Thread: Adding Active Media (/showthread.php?tid=16128)



- tartag - 2005-11-09

gents:

i'm looking to add the currently active media (audio or video) to my script enviornment. ya know, when you are listening to a track and you back out to say "my pictures" the album art and track information are displayed in the corner.  can i add this to a python script? my assumption is that the stanza:       <visible effect="fade" time="1000">!player.hasaudio | ![player.hasaudio + system.idletime(60)]</visible>
is the xml equivalent.

as always your knowledge and guidence is appreciated.

cheers,
-tartag






- tartag - 2005-11-18

okay call it a :bump: or call it progress.

so i have gotten this far:
Quote:if xbmc.player().isplayingaudio() == 1:
if len(xbmc.player().getmusicinfotag().getartist()) > 0:
strinfo = xbmc.player().getmusicinfotag().getartist() + ' - ' + xbmc.player().getmusicinfotag().gettitle()
else: strinfo = xbmc.player().getmusicinfotag().gettitle()

am i missing any options? i.e. any way to get the icon/albumart associated with the media playing?

thanks.
-tartag