Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
Something keeps on deleting my data and I cannot find who it is!
#1
Bug 
I have set up Kodi 19.1 to use a MySQL database. I use metadata.themoviedb.org.python to scrape the metadata in. I have a blank profile with no addons and the only ones getting loaded are those packaged with Kodi.

The movie gets scanned into the library successfully:
Code:

Mysql execute: DELETE FROM streamdetails WHERE idFile = 1
...
Mysql execute: UPDATE files SET dateAdded='2020-04-24 18:33:58' WHERE idFile=1
Mysql execute: insert into movie (idMovie, idFile) values (NULL, 1)
...
Mysql execute: DELETE FROM uniqueid WHERE media_id=31 AND media_type='movie'
Mysql execute: INSERT INTO uniqueid (media_id, media_type, value, type) VALUES (31, 'movie', 'tt7541106', 'imdb')
Mysql execute: INSERT INTO uniqueid (media_id, media_type, value, type) VALUES (31, 'movie', '611605', 'tmdb')

However, as soon as I enter the Movies menu, the following happens:
Code:

------ Window Init (MyVideoNav.xml) ------
...
CGUIMediaWindow::GetDirectory (videodb://movies/titles/)
...
Mysql execute: DELETE FROM streamdetails WHERE idFile = 1
Mysql execute: INSERT INTO streamdetails (idFile, iStreamType, strVideoCodec, fVideoAspect, iVideoWidth, iVideoHeight, iVideoDuration, strStereoMode, strVideoLanguage) VALUES (1,0,'hevc',2.400000,1920,800,5412,'','und')
Mysql execute: INSERT INTO streamdetails (idFile, iStreamType, strAudioCodec, iAudioChannels, strAudioLanguage) VALUES (1,1,'aac',6,'eng')
... 35ms later
Mysql execute: DELETE FROM streamdetails WHERE idFile = 1
... 35ms later
Mysql execute: DELETE FROM uniqueid WHERE media_id=31 AND media_type='movie'
Mysql execute: INSERT INTO uniqueid (media_id, media_type, value, type) VALUES (31, 'movie', '611605', 'tmdb')
... 10ms later
Mysql execute: DELETE FROM streamdetails WHERE idFile = 1
Mysql execute: INSERT INTO streamdetails (idFile, iStreamType, strVideoCodec, fVideoAspect, iVideoWidth, iVideoHeight, iVideoDuration, strStereoMode, strVideoLanguage) VALUES (1,0,'hevc',2.400000,1920,800,5412,'','und')
Mysql execute: INSERT INTO streamdetails (idFile, iStreamType, strAudioCodec, iAudioChannels, strAudioLanguage) VALUES (1,1,'aac',6,'eng')

As you see, not only streamdetails is populated twice, but also the uniqueid entries are replaced and in the process, one is lost. The full log can be found here.

I don't care much for the double scanning but I care for the lost uniqueid; while not shown in this log, rating entries are also removed and only one is retained (always the TMDB one). What I am trying to figure out is if this is a bug with the scraper or with Kodi, or if there is some setting that has to be adjusted to retain the extra information. Any help would be much appreciated.
Reply
#2
(2021-07-05, 09:52)AMoo-Miki Wrote: but also the uniqueid entries are replaced and in the process, one is lost
That is a known issue which you can read about here and the attached github report... https://forum.kodi.tv/showthread.php?tid=359642
As for the streamdetails issue, I am hoping it is related to the uniqueID issue.

If you install the most recent nightly you will have the fix for the UniqueID. I am hoping that will solve the streamdetails issue also. Its the first time I have seen either of these issues on MySQL setup.
Download from here... https://mirrors.kodi.tv/nightlies/windows/win64/Matrix/
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
Thanks @Karellen. I checked the 20210703 build:
Code:

Mysql execute: UPDATE rating SET rating = 5.800000, votes = 10042 WHERE rating_id = 53
Mysql execute: UPDATE uniqueid SET value = '611605', type = 'tmdb' WHERE uniqueid_id = 138

It doesn't remove the rating and uniqueid entries, which is great; it does an unnecessary update which is relatively unimportant.

Just FYI, since you mentioned, the streamdetails part hasn't been impacted by the fix and continues to run twice.
Reply
#4
(2021-07-05, 20:53)AMoo-Miki Wrote: Just FYI, since you mentioned, the streamdetails part hasn't been impacted by the fix and continues to run twice.
The streamdetails are still being deleted then?
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
#5
(2021-07-05, 21:07)Karellen Wrote: The streamdetails are still being deleted then?

There are some 8 such sql queries in his log file. Search for Mysql execute: DELETE FROM streamdetails .
Reply
#6
(2021-07-05, 21:15)Klojum Wrote: There are some 8 such sql queries in his log file. Search for Mysql execute: DELETE FROM streamdetails .
That is in his original log. But he installed the latest nightly, and it is unclear to me whether the streamdetails are still being deleted, or it is "just running twice" like the uniqueID. I guess "unaffected" means still being deleted.

@AMoo-Miki
Are you adding these movies for the first time, or are you refreshing them back into the library. Is the deletion happening on the first run, then being re-populated on the second run?
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

Logout Mark Read Team Forum Stats Members Help
Something keeps on deleting my data and I cannot find who it is!0