Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
When Kodi insert records into streamdetails tabel (MyVideosxxx.db)
#1
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?
Reply
#2
(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
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#3
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.
Reply
#4
(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.
.
Reply
#5
(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.
Reply

Logout Mark Read Team Forum Stats Members Help
When Kodi insert records into streamdetails tabel (MyVideosxxx.db)0