How to get filename and duration of a playlist item?
#1
Is code like the following still valid to get the filename and duration of an item in a playlist? 
Listitem.getfilename() and Listitem.getduration() are marked as deprecated (see 9697 (PR) and https://codedocs.xyz/AlwinEsch/kodi/python_v17.html

What would an alternative solution look like ?

        playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
        playlist.clear()
        for myFile in self.fileCollection:
            playlist.add(url=myFile)
        filename = playlist[0].getfilename()
        duration = int(playlist[0].getduration())
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
How to get filename and duration of a playlist item?00