v18 Python Scraper - how to access files path
#1
I know its something new and only, demo is fine and everything, but I cannot access files path from inside scraper.
In demo script the path is hardcode inside the scraper but in real-life scraper that should not be the case.

python:
sys.argv
has only `title` and `year` in some cases, `action` and `handle`.

Even when I parse and get information about files that I'm adding to library I don't have the real path to file - which make it unusable right now.
Reply
#2
hmm... why do you need the file path?
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#3
To add file and be able to play it ?
Also to do something more while scraping for example hash it to md5, before adding - because its a shared library and I'm not allowed to rename files and all the files have same name. `Episode XX.avi` in `TVShow` folder, but my backed that is able to recognize them by md5 and/or full path. So any of those would be great.

Im also unable to create .nfo files to that path - because its read-only.

The only way to get correct data about this library is by getting full path in python scraper.
Reply
#4
well, scrapers don't add items to the database ;-)

a scraper only provides the metadata for an item to kodi.
adding the item the the database is done by kodi.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#5
(2019-04-03, 22:44)ronie Wrote: well, scrapers don't add items to the database ;-)

a scraper only provides the metadata for an item to kodi.
adding the item the the database is done by kodi.

that's resolve one issue, the other was is even more important - I want to do something with the file, compute hash from it and then use backend to search for it, I need full path of file anyway.
Is that possible ?
Reply
#6
nope, don't think that's possible.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#7
(2019-04-04, 08:58)ronie Wrote: nope, don't think that's possible.

Ok, thanks for confirming, then I need to workaround it the other way. good that I didn't invest as much time as I planned on this. Thanks !
Reply

Logout Mark Read Team Forum Stats Members Help
Python Scraper - how to access files path0