Broken Integrate video plugin provided Movies directly into the Kodi database
#61
even more strange kodi calling it's resume pointers 'bookmarks' - i dont see the relation

----

history of using 'bookmarks.json' in my addon stems from my use of matthuisman's addons, 3 of them in fact, he has universal bookmarks across his addons and they are in 'bookmarks.json'

initially i was going to use 'favorites' but when i realized his addons do 'bookmarks' i changed mine and at some point the addon would be capable of automatically scanning in bookmarks created by his addons

that since has lost traction because there is really no more functionality to a context menu 'add bookmark' from his addon and mine being universal and having a context menu 'import to kodi'

if you browse the code you will see references to favorites still remains as well as the scanning for bookmarks.json files even though it isn't used in the current iteration
Reply
#62
I have just completed a major rebuild, pushed it to my live kodi from my dev kodi a few hours ago and everything seems to be solid after some quick final fixes.

link in first post - https://forum.kodi.tv/showthread.php?tid=374003

content should be set as "local information only" at this point but it is not required

if you prefer your content be scraped by a kodi scraper be aware this will not prevent the addon from scraping it, kodi will just rescrape and it will take longer

initial load times are less than impressive but subsequental ones are quite good due to the use of caching
Reply
#63
working on finishing touches for v0.0.4 but i have a couple bugs i am trying to work out first

-----

once i work these out i will provide a new release

pretty much reworking things to improve how they function, universalizing functions into modules, improving data sets

-----

with the way things are going i am considering writing a PHP/SQLite backend to be used with this as a network based library served from a nas or other network appliance

if i do then there are more possibilities and potentially a completely different addon altogether

edit:

refresh flag is not being removed and so the bookmark never gets removed after a performing a Refresh from Kodi

found the cause, working on a fix
Reply
#64
0.0.4a now available - link and changelog on first post https://forum.kodi.tv/showthread.php?tid=374003

improved speed considerably when scanning in items initially, once scanned in the listing is nearly instantaneous as it should be

ive been testing changes for quite some time now on my debian dev machine and my main android setup, no other testing platforms used

it is on track to drop the pre-alpha on the next release and begin alpha phase

-----

i found it is quite possible to integrate backend content providers and link them by using a different id, on this i was able to directly call both disney and hulu api modules from matthuisman without going through the front-end of listing content from kodi

this was done by a slightly hackish method of appending paths to sys.path then "import from lib.api as disneyapi"

the downside, other than being hackish, is that Kodi loses track of what it is doing so if you call the Hulu api, delete it with "del" it does not delete so then when trying to call disney afterwards it is actually still calling Hulu and fails

attempted another method using importlib but it's not working with the relative imports in those addons

the only way to make this work was to physically copy the lib folders to the integrate folder but i do not want to include code from other projects
Reply
#65
i put together an example internal scraper and used The CW as a content source

this will list episodes from a show on TheCW, given the "show slug"

example list of internal data from thecw where the slug would be retrieved  - https://www.cwtv.com/feed/mobileapp/shows?api_version=3

for the example i used The Flash, https://www.cwtv.com/shows/the-flash and as you can see the slug is the end of the url "the-flash"

you would call this from the addon default.py when listing a show's episdes, after line 66 currently

store the slug as an 'id' in bookmarks.json under 'ids', so ids[{'tmdb': 60735, 'thecw': 'the-flash'}]

then after 66 you would simply check if 'thecw' in selected['ids'] and if so, call parseEpsCW(selected['ids']['thecw']) to list the episodes of the flash that are available on The CW

https://paste.kodi.tv/xekoxazole

note - the example should iterate seasons at line 51 but it was an example and the cw only lists 1 season for the-flash so i got lazy out and set it to the first

this would be enough information to load those episodes into kodi, not really full information however, at that point it would be time to call the internal tmdb scraper for extra details


the entire bookmark entry to add the flash to the series list would be only a few lines -


json:
    {
        "label": "The Flash (2014)",
        "path": "plugin://plugin.video.integrate/tvshows/?tmdbid=60735",
        "folder": 1,
        "ids": {
            "tmdb": "60735",
            "thecw": "the-flash",
        }
    }
Reply
#66
This has undergone a rebuild using matt huisman's framework, I am working with his project to add additional support for some things needed by my integrate module.

There has been discussion about bringing this to his framework so his addons will be able to import natively.

No decision has been made on that front but there is an impending release whether standalone or not.

Still some work to be done but it all looks promising ...

UPDATE:

back in the rubbish bin - porting to a new framework has not resolved the underlying issue that Kodi cannot handle as much as i am trying to do - huge memory usage and crashing still present
Reply

Logout Mark Read Team Forum Stats Members Help
Integrate video plugin provided Movies directly into the Kodi database0