How to check, if a movie is in a folder on the share, or not
#1
Hi

I have a ListItem (https://codedocs.xyz/xbmc/xbmc/group__py...titem.html) of a movie and would like to check, if the movie file is in a folder or folder structure below the source's base path or as a file directly in the source's base path. The reason for this is that I would later like to move the movie.

How can I achieve this? Can I get the "importing" source of a movie, it's path, and compare the paths?
Or can I get a list of all the sources with type "movies" and compare to them?
Do I have to check this in the library database?

Any help and hints are very appreciated, thank you
Reply
#2
@Montellese or anybody? Wink Any ideas?
Is there a way to get the file sources for the library from Python? Any hint is very appreciated.
Reply
#3
AFAIK the python API does not offer any way to get a list of media sources. But IIRC JSON-RPC provides Files.GetSources to get a list of media sources for the provided "media" type which must be one of the following:
  • video
  • music
  • pictures
  • files
  • programs
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
Got it working - thank you so much!
I didn't know about the JSON-RPC API yet. Your input is very much appreciated.
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
How to check, if a movie is in a folder on the share, or not00