list dir in upnp server
#1
Hi experts
I am currently developing a custom addon which connects with my dlna server. I have sing up the dlna server as media source in the kodi interface. If I use the interface explorer I can see the names of the directories in the DLNA server correct. However if I use the function xbmcvfs.listdir(path) where path is the media source upnp and is with the format.. "upnp://...", the directories dont have the correct names, the directories names are in format "%240%" and something like that, which is a format I cannot understand. Moreover, the function xbmcvfs.listdir(path) never distinct between files and directories when I use an upnp url, they are only directories. In the kodi interface they show my dlna server the correct names of the folders and the files.. so I think that the interface use a trnaslation of the url givenn. My question is about this url translation where is it and how to use it. Or maybe is not used the function xbmcvfs.listdir(path) and I have to use another one to connect to a DLNA server from my addon.

Thanks for your time
Reply
#2
Moved to addon development
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#3
(2019-11-24, 19:39)Lotykun Wrote: Hi experts
I am currently developing a custom addon which connects with my dlna server. I have sing up the dlna server as media source in the kodi interface. If I use the interface explorer I can see the names of the directories in the DLNA server correct. However if I use the function xbmcvfs.listdir(path) where path is the media source upnp and is with the format.. "upnp://...", the directories dont have the correct names, the directories names are in format "%240%" and something like that, which is a format I cannot understand. Moreover, the function xbmcvfs.listdir(path) never distinct between files and directories when I use an upnp url, they are only directories. In the kodi interface they show my dlna server the correct names of the folders and the files.. so I think that the interface use a trnaslation of the url givenn. My question is about this url translation where is it and how to use it. Or maybe is not used the function xbmcvfs.listdir(path) and I have to use another one to connect to a DLNA server from my addon.

Thanks for your time
Hi, I have found the answer by myself. I am goingo to post here in oirder to help someone else.
Apparently, for this issue you do not have to use the xbmcvfs.listdir functions or any from this packages. To achieve this, you have to use JSON RPC for KODI, using this service you can list all your sources where will be the UPNP source and after that you can explorer the files inside the UPNP server using the list requests in JSON RPC. Using this service you will have the correct file names and directory names.
Reply

Logout Mark Read Team Forum Stats Members Help
list dir in upnp server0