Broken Integrate video plugin provided Movies directly into the Kodi database
#16
(2023-08-10, 11:36)jbinkley60 Wrote: Thanks for the response.  I believe they are similar and I wasn't questioning your use of a particular sharing solution and I fully get the Mezzmo hosting platform limitations.  I live a bit of a sheltered life with regards to Kodi and other solutions so I often ask questions simply seeking to understand (often by comparison / contrast from my reference point).  I don't use or haven't used a lot of other Kodi addons but Kodi is rock solid as my main media client so I try to get the most out of it with my setup.  I sometimes question various use cases to get ideas for additional functionality for my own addons or to see if there is a process vs. technical solution to the problem.  

I took it as intended - questions on how things work not a question of a general "why that and not this"
 
(2023-08-10, 11:36)jbinkley60 Wrote: Getting the addon developers to leverage it is likely part of the challenge.  Likewise the Media Importer solution that Lunatixz posted the link to is very interesting.  I've looked at it a few times and may one day write the Mezzmo importer for it.  The challenge I see for it right now is that it requires special builds.  Once it goes into the main code I suspect the usage will pick up significantly.   

Developers seem to be happy with the way it is, possibly because that's the way it is. Hopefully this will bridge the addon implementation bit.
I like and dislike the media importer for the same reason, need for it to be another custom branch.
 
(2023-08-10, 11:36)jbinkley60 Wrote: With regards to addon testing, that hasn't been much of an issue for me.  I have a good testbed for various Linux and Windows versions of Kodi (hard clients and virtual machines) and I have some loyal nVidia Shield users who help on the Android side.  But having said that, this is where Kodi's Python addon approach really shines.  I can't recall ever having a platform specific issue.  I did have an issue once with a version of LibreElec which caused all Python addons to run slow due to not getting enough CPU resource allocation.  But that impacted all Python addons.  I've stayed away from binary addons, where this is a real issue to deal with.

I do expect it to run on all platforms but expectation vs reality.

I checked this again on Kodi from debian, Kodi (19.5 (19.5.0) Git:20230416-nogitfound), it still does crash (generates a crashlog and everything) so I have determined to explicitly force the addon to only work on v20+

Same machine, self compiled Kodi, Kodi (21.0-ALPHA1 (20.90.101) Git:20230321-124023d6ff), it does not crash and works as intended.

FireTV Gen3, self compiled Kodi, Kodi (21.0-ALPHA2 (20.90.201) Git:20230721-f087be63b4), it does not crash and works as intended.

Sent you a link with no expectations attached.
Reply
#17
Pretty sure this PR is at the heart of anything you are doing https://github.com/xbmc/xbmc/pull/14210 ... and if so why would we need this mystery plugin you created? stumped! post some source, otherwise this comes off as a thirsty thread.
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Help?
Reply
#18
(2023-08-10, 20:53)Lunatixz Wrote: Pretty sure this PR is at the heart of anything you are doing https://github.com/xbmc/xbmc/pull/14210 ... and if so why would we need this mystery plugin you created? stumped! post some source, otherwise this comes off as a thirsty thread.

sure, as is where is - pre-alpha testing version 0.0.1a 20230810

https://transfer.sh/NYfvuvF4j4/plugin.vi...0810.1.zip

i will post a rundown shortly and amend it to the first post - done

----

btw i tried the addon you made maybe 6mo ago, i couldnt make it work but it was a nice design and concept
Reply
#19
@jepsizofye,

Could you reconsider adding MediaImport Support. A Plugin that allows imports from any video addon would go a far way towards getting this mainline.

The chicken or the egg. It is not mainline so I won't do that plugin. That plugin is probably needed for it to go mainline.

Please reconsider
Quote:If the addon "only" adds items to the database when the user manually tells it to, it could simply use the
xbmcmediaimport.changeImportedItems() method to tell Kodi which items to add / update / remove. No additional synchronization process would be necessary.
If the addon tracks the items which it added to the library, it can still use the same method to tell Kodi about updates to the tracked items. Obviously it requires some additional boilerplate code to handle a provider and imports but that shouldn't be too difficult. There is a stub addon that you could look at.
Reply
#20
@LongMan

i have no issues looking into it and i have not discounted it but i presently dont understand it and from my point of view it "looks like" another abandoned fork

i am seasoned in computing, but i am not a seasoned Kodi developer and it takes me longer to search through the code to figure things out - this has been kicking around since at least February to only just now be releasing testing code

-----

if i understand that project at all then this would integrate smoothly by just adding a couple of extra handlers so it can be called in a different way but perform the same tasks

give me some time
Reply
#21
Ahhh. I Like that.

Thanks
Reply
#22
(2023-08-10, 21:00)jepsizofye Wrote:
(2023-08-10, 20:53)Lunatixz Wrote: Pretty sure this PR is at the heart of anything you are doing https://github.com/xbmc/xbmc/pull/14210 ... and if so why would we need this mystery plugin you created? stumped! post some source, otherwise this comes off as a thirsty thread.

sure, as is where is - pre-alpha testing version 0.0.1a 20230810

https://transfer.sh/NYfvuvF4j4/plugin.vi...0810.1.zip

i will post a rundown shortly and amend it to the first post

----

btw i tried the addon you made maybe 6mo ago, i couldnt make it work but it was a nice design and concept
THX, Direct writing to DB? that's not copasetic... I wouldn't recommend these methods for plugin incorporation. There are a lot of better solutions, most important; methods that are allowed in the official Kodi repository. 

PseudoTV Live? it's in beta; any constructive feedback is appreciated.
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Help?
Reply
#23
(2023-08-10, 22:13)Lunatixz Wrote: THX, Direct writing to DB? that's not copasetic... I wouldn't recommend these methods for plugin incorporation. There are a lot of better solutions, most important; methods that are allowed in the official Kodi repository. 

direct writing only to set the path's content type in the database initially so they can be scanned

i would much prefer to have a jsonrpc "SetContent" method for a path but it doesnt exist and i dont know any other way

edit:

actually i am also using direct database to set "exclude" on paths, i was attempting to get kodi to stop scanning paths but it doesn't work and will be migrated to the bookmarks.json file instead
 
(2023-08-10, 22:13)Lunatixz Wrote: PseudoTV Live? it's in beta; any construction feedback is appreciated.

i meant this one https://forum.kodi.tv/showthread.php?tid=327514 somehow i recalled incorrectly it was by you

i do think you did something similar though
Reply
#24
(2023-08-10, 23:11)jepsizofye Wrote: direct writing only to set the path's content type in the database initially so they can be scanned

i would much prefer to have a jsonrpc "SetContent" method for a path but it doesnt exist and i dont know any other way

Yep or you end up like this.  Not some of my best code (some of my earlier work in the addon) but it is bulletproof, checks for the path parent, creates the parent if none exists, adjusts for the various media types, checks for field table entries for the video and inserts if missing (since the file table needs a path table value).


Thanks,

Jeff
Running with the Mezzmo Kodi addon.  The easier way to share your media with multiple Kodi clients.
Service.autostop , Kodi Selective Cleaner and Mezzmo Kodi addon author.
Reply
#25
i went through the kodi source to find an alternative

VideoDatabase has SetScraperForPath that is only called from GUIWindowVideoBase.cpp

OnAssignContent and OnUnAssignContent are in GUIWindowVideoBase.cpp which are the only 2 functions that call SetScraperForPath

OnUnAssignContent is called from within OnAssignContent

OnAssignContent is called from the OnContextButton case CONTEXT_BUTTON_SET_CONTENT

attempts to emulate this with ActivateWindow(contentsettings) or ActivateWindow(contentsettings,path) do not work - though they do open the window, they do not "set the content"

-----

so, as unfortunate as direct may be, it is actually the only way currently available
Reply
#26
(2023-08-11, 01:01)jepsizofye Wrote: -----

so, as unfortunate as direct may be, it is actually the only way currently available
Which is where I ended up, as well as JSON RPC would be way too slow for the volumes I deal with.  During the Mezzmo Kodi addon sync process I typically run in the 30-50 inserts per second into the database (depending upon the platform).  This is all background and I don't drop the indexes but do a minimal number of commits.  You may face that with a JSON RPC approach if an addon has a lot of items to insert at one time. 

If you do want to look more at Media Importer, this post begins a dialog I had with LongMan and Montellese regarding it, functionality, speed / performance and such.  Ignore some of my dumb questions as I was trying to understand what it does.  If you read a few pages of posts there is some good info.  Montellese did improve the performance significantly with threading and other enhancements.  As well as creating a quick start approach here.  It is pretty helpful. 




  Thanks,

Jeff
Running with the Mezzmo Kodi addon.  The easier way to share your media with multiple Kodi clients.
Service.autostop , Kodi Selective Cleaner and Mezzmo Kodi addon author.
Reply
#27
newer version available on first post, removed the database exclusions and moved to bookmarks only as promised

still trying to find a way around adding to the paths database but other options seem more hacky and are more cumbersome after the fact for the user

options considered to resolve are -
allow/ask the user to put the sources manually into sources.xml as was previously done, not my favorite as users are not always capable technically
programmatically add them to sources.xml on behalf of the user, this option makes me cringe more than adding to the database
programmatically add them to mediasources.xml so the user may "Add Sources" and select them, also seems hacky and has the issue of the first solution regarding users

on the positive side if they are added as sources to either mediasources or sources.xml they are easier to manage after the fact
Reply
#28
trying to setup scraping in the backend so the database calls will not be needed but it isn't meeting my standards

i have a request open for advice from the developer of the scraper
Reply
#29
To me, the question of direct database calls is what is the right tool for the job and whether you want your addon in the official Kodi repo or not.   I have some addons like the Mezzmo Kodi addon and KSCleaner which could never be written without direct database calls or performance would be too slow to use.  For those I have a third party repo for the Mezzmo Kodi addon to allow automatic updates and for the other, folks can download updates from GitHub.  I have other  addons which are in  the official Kodi repo.  One thing I try to do with all my addons is not make them dependent upon other addons I don't own, except if they are Team Kodi addons.  This minimizes long term support issues.

There are pros/cons of using the Kodi repo.  The pros are not having to run your own third party repo (no extra work once setup), you get an extra set of eyes on your code and more folks tend to use it.  The cons are it takes longer to publish updates and I find the publishing process a bit more complicated (but if you are accustomed to publishing PRs in GitHub then it isn't a big deal).  I personally would like to see exceptions for the Kodi repo supporting direct DB calls but I understand Team Kodi's position and why they do this.  Besides it would probably take me months to get the Mezzmo addon through their submission process, if they allowed direct calls.   Smile


Thanks,

Jeff
Running with the Mezzmo Kodi addon.  The easier way to share your media with multiple Kodi clients.
Service.autostop , Kodi Selective Cleaner and Mezzmo Kodi addon author.
Reply
#30
(2023-08-11, 23:43)jbinkley60 Wrote: To me, the question of direct database calls is what is the right tool for the job and whether you want your addon in the official Kodi repo or not.   I have some addons like the Mezzmo Kodi addon and KSCleaner which could never be written without direct database calls or performance would be too slow to use.  For those I have a third party repo for the Mezzmo Kodi addon to allow automatic updates and for the other, folks can download updates from GitHub.  I have other  addons which are in  the official Kodi repo.  One thing I try to do with all my addons is not make them dependent upon other addons I don't own, except if they are Team Kodi addons.  This minimizes long term support issues.

i getting that, my alternatives turn into a massive side project just to avoid 2 small lines of code because theyre frowned on

i think the decision will be either it works this way, i can make it manual from settings or do away with it and allow people to add their own sources - im weighing them

i did submit a feature request for the functionality to be added to the jsonrpc to set a path's content and scraper

as far as having this in the kodi repo, it was never a goal - i have little interest in or time for large scale support, just thought it was interesting and different enough for a small number of people to find it interesting as well but not really for users who's "accomplishments" include powering on their device
Reply

Logout Mark Read Team Forum Stats Members Help
Integrate video plugin provided Movies directly into the Kodi database0
This forum uses Lukasz Tkacz MyBB addons.