v15 Get the full path of the currently playing playlist in Python
#1
Star 
Hello!
When you open a playlist using PlayMedia("full m3u path") how do you later get the full path of the currently playing playlist from Python script?
I did not manage to find the required getter or way to extract this path.

And, generally, how do you get the full path of any playing playlist in Python, including playlists open through Kodi GUI ?

I need the python script to be able to extract the full path of any open playlist whenever the event of opening playlist happens (and, possibly, any time whenever the playlist is playing on any position). What is possible to extract is the full path of the playing file/stream (current position in a playing list), but how to get the playlist path?
Reply
#2
Bump.
Reply
#3
Bump. If that is impossible, could someone from the devs tell it is?
Reply
#4
Still looking for a way..
Reply
#5
Your question would have more attention in the addon development section. Its hard to know what u want to do (too generic) but infolabels exist for that.

You can use xbmc.getInfoLabel("Player.Filenameandpath")
Reply
#6
Hello, enen92!
As I mentioned in the first post, "quote:" What is possible to extract is the full path of the playing file/stream
That's exactly what your infolabel returns.

What I need, is the container for this infolabel. Container is a playlist, while this infolabel returns the url of the playing stream!

Example:
<Playlist path: /home/kodi/playlists/playlist.strm>
# content of playlist.strm file
# link 1
http://some.link.com/1.m3u
# link 2
http://some.link.com/2.m3u

So, xbmc.getInfoLabel("Player.Filenameandpath") will return
either "http://some.link.com/1.m3u" (if it is playing now)
or "http://some.link.com/2.m3u" (if this one is playing now)

Both are playing inside the strm playlist, so you open it from Kodi and then go within with Next/Previous.

Never will it return what I need, namely "/home/kodi/playlists/playlist.strm"!
But it should be saved somewhere inside Kodi!
It cant just throw it away after reading the links from a playlist to the object.

So, how?
Reply
#7
Just save to favorites or superfavorites and you find all the 'paths' in that file.
Reply
#8
Smile The question, is how DYNAMICALLY extract the full playlist path. You can invoke the python script while playing the file (example: press the key). I need to do it dynamically, after the playlist was opened by Kodi.

Suppose, I want to save to my log file the currently playing playlist system path (not stream, not the file from playlist, but the playlist path itself) whenever I press the keyboard button. The action for this button is invoking saveplaylistpath.py.

What's inside the py script?
Reply

Logout Mark Read Team Forum Stats Members Help
Get the full path of the currently playing playlist in Python0