2012-03-23, 18:13
Hi all,
I am developing an add-on and I am integrating it into the XBMC code. The main idea consists on uploading a file to a certain WebServer. I pass the path to the file, which I get via CFileItemPtr->GetPath(), to the python script. This was working fine until I run into the case where GetPath is returning the Database index for, for instance, the movie I am displaying on the Video Navigation window.
The problem is that I cannot upload a file if I have the path like ""videodb:/1/23/ ...", but I rather need something like a local path, i.e. "C:/Documents/Movie.mkv". I've been browsing through the C++ code and the Python xbmc modules, but I can't find a proper function to obtain the Path from the database, or if there is an actual function that would return the local path instead of the database indexes.
Does anybody have an idea about how to get the actual path to the file rather than the database index? It does not matter if in C++ (which I believe more plausible) or in Python ( which would be indeed faster and easier, but more unlikely)
Thanks in advance,
Efren
I am developing an add-on and I am integrating it into the XBMC code. The main idea consists on uploading a file to a certain WebServer. I pass the path to the file, which I get via CFileItemPtr->GetPath(), to the python script. This was working fine until I run into the case where GetPath is returning the Database index for, for instance, the movie I am displaying on the Video Navigation window.
The problem is that I cannot upload a file if I have the path like ""videodb:/1/23/ ...", but I rather need something like a local path, i.e. "C:/Documents/Movie.mkv". I've been browsing through the C++ code and the Python xbmc modules, but I can't find a proper function to obtain the Path from the database, or if there is an actual function that would return the local path instead of the database indexes.
Does anybody have an idea about how to get the actual path to the file rather than the database index? It does not matter if in C++ (which I believe more plausible) or in Python ( which would be indeed faster and easier, but more unlikely)
Thanks in advance,
Efren