Detect Local files in Video, Music and Pictures navigation.
#1
Hi all,

I am currently developing for xbmc to integrate the XBMC Eden with some addons of my own. This addons allow to copy files and upload them to certain Servers over the Internet. However, this files can only be uploaded in case the files to copy are located in my local hard drive or an external hard drive. I´ve been browsing through the forum and I haven´t seen any thread regarding this issue, so here it is my question:

Is it possible to detect, by FileItem properties or CURL properties, whether this file is located in a local disk and not in a SMB or UPnP server?

I am running on my local Linux machine.

Thank you in advance
Reply
#2
Nothing like that is exposed to python, no. You could probably make a reasonable stab based on the URL.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
Not if you e.g. mount a remote share to a local drive letter on win32 Wink
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#4
Sure, but I'm guessing that the reason for local files is that the plugin is running some program that doesn't know anything about XBMC's filesystem stuff to do the nasty distribution aspect, thus the need for "local" files.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#5
Thank you all for all the responses.

I am trying to do this by modifying a little the C++ code of XBMC, since my idea is the integration of my plugin into the Pictures, Music and Videos Navigation windows. The problem is that the elements displayed in this windows may be in any Samba or DLNA server, which will serve me an URL.

To upload the file using the API that I have I need the file.read() python function, which does not work with URL but rather with "local" files. I can of course parse the URL of the element, but I am afraid I´d leave out some protocols or options that the XBMC developers have already thought about it. As I´ve said I checked the CURL class and the FileItem class, but since it is not very deeply documented ( which of course I am not complaining, I know it sucks to document the code), I can´t figure out whether there is one suitable function for what I have.

Thanks in advance
Reply

Logout Mark Read Team Forum Stats Members Help
Detect Local files in Video, Music and Pictures navigation.0