Thread Rating:
  • 0 Vote(s) - 0 Average
Translate Database path to file location
#1
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
Reply
#2
the video tag of the item has the real path.
Reply
#3
Thanks for the fast response spiff!! I am sorry to be so persistent on the same problem, but I can't see the same solution using the Music Tag, anybody has any idea?

Thanks in advance
Reply
#4
See xbmc/filesystem/FileMusicDatabase.cpp or thereabouts.
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: badge.gif]
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
Translate Database path to file location00