v18 Genre information not updated after delete and rescan a movie
#1
Hi, I scanned some Sci-Fi movies with UMS to library, and I could see they had genre "Sci-Fi". To uniform some data, I created NFO file for these movies and there is "<genre>Science Fiction</genre>" in these NFO files. I deleted all these movies from library by setting the folder content type to "None" and scanned them again with local information only scrapper. After scanning to library, I found the genres for these movies are still "Sci-Fi". But when I refreshed SOME (not ALL) of these movies manually (after updated part of the NFO files), the genre for these updated movies had been changed to "Science Fiction", so at last I got both "Science Fiction" and "Sci-Fi" genres in my library.

My questions is why the genre information is still there for deleted movies? And even worse, these stale information is still applied for new movies and the new information is just ignored? What's the logic here? This issue seems also exist for video file information (audio codec/subtitles, etc.). I reencoded a movie with a different language of a subtitle (but the file name is still the same), after rescanning I found Kodi still show the old subtitle language.

Forgive me if I'm naive on this, but I think in any situation, Kodi should always use the new information. There is no any reason to keep the old information and apply them to the new item.
Reply
#2
(2019-03-18, 09:28)xodi Wrote: I deleted all these movies from library by setting the folder content type to "None
Did you answer Yes to "remove all these paths from the library". After you do that, you have to run a Clean Library from the settings page to permanently delete them. For some reason, some information is left over until the Clean Library is run.

Try again and let us know if it works for you.
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
I did answer "Yes" for that and I saw all movies were gone in library. I also cleaned library several times. There is a PR https://github.com/xbmc/xbmc/pull/15589 seems related with part of this issue.
Reply
#4
Nope, that is a different problem.

So you answered Yes, then you immediately Cleaned Library? That should have emptied the database of all metadata.

I just tested on my test library here, and those steps cleared all metadata from the database

Can you try again if you have time?
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
BTW, there is another issue for this. For the movies with BD folder structure, even I set content to "None" and answered "Yes" and cleaned up library, they are still in library that I can see. I have to manually delete them from movie library one by one to remove them.
Reply
#6
Just tested it again. I deleted all movies (and deleted movies with BD folder structures manually). I pulled the MyVideos116.db to local and opened the database, I found there are still 192 movies in "movie" table, the "movie_view" is empty though.

I also set a new Kodi for test and scanned around 100 movies, after cleaned up, the "movie" table is empty. Not sure why there is this issue for the one I'm using.
Reply
#7
Movie and Movie_view should show the same entries, but with added columns in the movie_view.

Are you using MySQL setup?
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
#8
No, the default db. Is it safe to manually empty the "movie" and "genre" tables? I have TV Shows and Music also, don't want to mess up them.

BTW, I'm using the DB Browser for SQLite to check the db, if that matters.
Reply
#9
Music is stored in the separate Music DB

Music Videos, Movies and TV Shows are in the MyVideos116.db

No, it is not safe. Just deleting the movie entries, yet leaving all the relational links in place will cause havoc in the database.

You should export your library to Separate Files, then rebuild in new databases by scanning the nfo files.
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
#10
(2019-03-18, 09:28)xodi Wrote: stale information is still applied for new movies and the new information is just ignored? What's the logic here?
I think the trip up, is that Kodi keeps it's library internally, when you make physical edit changes to the .nfo in the video folder, nothing really changes until you pull these changes back into the library, a simple local individual re-scan will do this but not a global scan, as that would assume Kodi actually checks each and every .nfo for changes which it doesn't do. You need to clean the source and then re-scrape the source.
Reply
#11
(2019-03-21, 02:05)PatK Wrote:
(2019-03-18, 09:28)xodi Wrote: stale information is still applied for new movies and the new information is just ignored? What's the logic here?
I think the trip up, is that Kodi keeps it's library internally, when you make physical edit changes to the .nfo in the video folder, nothing really changes until you pull these changes back into the library, a simple local individual re-scan will do this but not a global scan, as that would assume Kodi actually checks each and every .nfo for changes which it doesn't do. You need to clean the source and then re-scrape the source. 
 I understand this and already mentioned in the OP that with refresh for a single movie the information got updated. The issue for me is somehow, there are many old movie records still in the movie table, even if I already removed all sources and deleted all movies from library. And when I added sources again and scanned all movies to library, the old information for many movies applied, and the new information in NFO is not. I thought when I removed an movie from library, all information about the movie and the associated movie file should be removed from the library. And also as I mentioned, all movies with BD folder structure are not removed from library even if you removed the source and removed all movies. You have to manually remove these BD movies from library.
Reply
#12
I'm a bit POed atm, had a nice succinct message that got lost on page flip, but the essence is relived here. 

Caches explained (wiki) This wouldn't be the first time I've heard local cache issues. This could be related to a library that is less than fully functional, somehow the gremlins have had a party and you'll left with clean-up duties. Let's change the perspective: Imagine you did a portable Kodi install, delegate your sources and scraped locally; think you would have ghost or spurious entries? I'm not sure how we got to this point, there have been errant code in some add-ons in the past. (note to one self: always blame add-ons) You might want to check out Texture Cache Maintenance utility (wiki) it did work for me, but be prepared for a bit of reading https://forum.kodi.tv/showthread.php?tid=158373

I'll hold the handkerchief.

P.S. if you love Kodi as much as I do you will keep multiple portable installations, should some code go bang.
Reply

Logout Mark Read Team Forum Stats Members Help
Genre information not updated after delete and rescan a movie0