Kodi Community Forum

Full Version: When Kodi insert records into streamdetails tabel (MyVideosxxx.db)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
In the GUI, first I choose the videos menu then enter the folder that I added earlier as a video source media location. I am looking for the method which inserts a new record into this MyVideosxxx.db/streamdetails table. I would like to call this method remotely with JSON-RPC or create an add-on if not exists already. Do you know anything about this?
(2023-02-07, 23:59)gyzszabo Wrote: [ -> ]I am looking for the method which inserts a new record into this MyVideosxxx.db/streamdetails table
1. When you scan or scrape the title into the library, the streamdetails are read as part of that process.
2. If you don't scan or scrape then when you view the actual video file in Videos>files, the streamdetails are read.

As for the actual code that does that, maybe some of these PR's will help you find it... https://github.com/xbmc/xbmc/pulls?q=is%...in%3Atitle
Thank you for your fast response. Do you know how to write into this table? In the source code, I found "xbmc/utils/StreamDetails.cpp" but I am looking for an API call from python or JSON-REST to discover the video file details and write it into DB. Like it happens when I manually enter the Video folder in the GUI. I would be thankful for any help you can provide.
(2023-02-08, 20:16)gyzszabo Wrote: [ -> ]Thank you for your fast response. Do you know how to write into this table? In the source code, I found "xbmc/utils/StreamDetails.cpp" but I am looking for an API call from python or JSON-REST to discover the video file details and write it into DB. Like it happens when I manually enter the Video folder in the GUI. I would be thankful for any help you can provide.

JSON-RPC doesn't, I guess you could use Player.Play method to force Kodi to read the file stream details.  (And I think JSON-RPC provides more capability than a pure REST interface, http is one possible transport.)
For the python interface, xbmc module does provide Audio/Video/Subtitle StreamDetail classes with various setter and getter methods, though I don't know if these actually update the videodb.  (Better to ask in development/add-ons forum.)

scott s.
.
(2023-02-08, 22:02)scott967 Wrote: [ -> ]xbmc module does provide Audio/Video/Subtitle StreamDetail classes with various setter and getter methods, though I don't know if these actually update the videodb.  (Better to ask in development/add-ons forum.)

Thank you! I make a try with python and make my own small add-on.