Kodi Community Forum

Full Version: Mysql Library mixing up Tv shows
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, 
I have just installed and configured mysql, and things are working out fairly well, all movies (which are centrally located on one nfs share) are added very nicly, then I went to add my shows. I have my Tv shows spread between two drives on my main server, and thus shared as two different nfs shares. I have made a single Tv shows source and added both nfs shares to it (wich i used to do before using mysql) and then began scrapping. 

It takes its time as there are many shows, when it finished I only had half of the shows. So i started looking through and it seems that it added one share and scraped it, then added the second, but somehow added the episodes into other tv series. 
By this i mean
If I select Dexter, and go into season 1, it shows 2 of each episode number, and the second one is actually an episode of Full metal alchemist. 
then it alternates, one ep of  dexter, then one ep of Full metal Alchemist.

I removed and readded the tv shources and rescanned and the same thing happened (different mix ups tho)

I dont even know how this would happen. Has anyone seen this before
Hello ketterer

Have seen this problem a couple times before. It could be a combination of factors like improperly set Sources and bad folder and file naming structure.

Provide a debug log that captures a Library Update. It would be very helpful if you first remove a few of those mixed up shows from the library, then enable debug mode, restart Kodi and then run the update library.
I just removed all of them so It will be a little bit before i can get a good log, but I will post one asap
Wow that took forever to actually finish, sorry it was hours,
@Karellen Karellen here is my log, 
https://paste.ubuntu.com/26268733/
https://paste.ubuntu.com/26269359/
so here the fun info. 
After the library update was done I again had a lot of missing series. I looked for a shorter sereis that was mixed up, in this case the crazy ones. it was mixed up with walking dead. Under tv shows i selected The Crazy Ones, Season 1, and there there was episode 1 of crazy ones and then episode one of walking dead, and so on. all the walking dead episodes have their episode info (which is accurate as far as i can tell) and the thumbnail was correct.
then i removed the crazy ones from my library. turned on debugging and restarted kodi. 
I then went to files and found the crazy ones, and scanned it to my library. 
NOW when i go to tv shows and I The Crazy Ones, Season 1, and there there was episode 1 of crazy ones and then episode one of All in the family (or archie bunkers house, i cant tell) ?!?!?!?! like what the heck, now its mixed up with a totally different show.

I have used these exact files before but they were locally, now they are in a mysql database and through NFS (though technically still local) 

Any Ideas?
The forum moderators have determined that banned addons (wiki) are present on your system. To receive assistance here, these banned items must be removed. If a clean log is not submitted within 3 days, then the relevant post(s) will be removed after this time.
"Karellen" Sorry this is my test bench so i try everything out there
https://paste.ubuntu.com/26269359/
here is on a fairly clean install, same result which leads me to beleive it is the database or sources (as i copied sources over)

You are able to add 1 source with mutiple paths(NFS paths) in it  are you not?
Below is my sources.xml
 
 </programs>
<video>
<default pathversion="1"></default>
<source>
<name>Movies</name>
<path pathversion="1">nfs://192.168.2.112/media/ketterer/Movies/Movies/</path>
<allowsharing>true</allowsharing>
</source>
<source>
<name>Tv Series</name>
<path pathversion="1">nfs://192.168.2.112/media/ketterer/TV Series/Tv Series/</path>
<path pathversion="1">nfs://192.168.2.112/media/Storage &amp; Media/Media/Tv Series/</path>
<allowsharing>true</allowsharing>
</source>
</video>
<music>
<default pathversion="1"></default>
</music>
<pictures>
<default pathversion="1"></default>
</pictures>
<files>
<default pathversion="1"></default>
<source>
<name>MediaRepo</name>
<path pathversion="1">http://mediarepos.net/tco/</path>
<allowsharing>true</allowsharing>
</source>
<source>
<name>root</name>
<path pathversion="1">/</path>
<allowsharing>true</allowsharing>
</source>
</files>
</sources>
Alright so what I found is that it seems to have been the nfo files up along with my. I ran a simple command to delete all of the nfo files and then Reese scraped my library and as of now it looks like it's scraping properly. It's currently not finished but I am unable to continue to watch it until later this afternoon. I will report back once I can verify that everything is copacetic. I don't know or understand why the nfo files what are causing a problem. I think they may have been from an old library export could not have caused this problem?
Hello ketterer,

Yep, I was wondering the same thing when I looked at your log and noticed the nfo files. (also mysql).

Could you post two of your nfo files at pastebin if you still have them handy. Just grab the nfo files for both the S01E01 episodes of the two mixed shows.
Sorry I used a command to irrevocably delete them. I use trakt to keep track of watch status for the most part so I wasnt trying to maintain them.
Thank you for the help though, I always forget to look at logs for stuff like this, but after looking at them I was able to see that it was crossing them at that level with different ids.
Sorry for reviving this old thread, but I found it as I had the very same issue. I am using Kodi 18 on a Lubuntu 18.04 system and I have my video library in an external MariaDB 10 database on a Synology NAS. I have recently updated from Kodi 17. Even before I had the problem of TV shows getting mixed up but I had the feeling that it got worse under the new setup. After a couple of days trial and error I have found what apparently was the reason in my case. I have to mention that I do not use Kodi to write nfo files. I use Tiny Media Manager instead. I have a few TV shows which are not contained in any of the online databases which TMM is scraping, so I enter the metadata manually and let TMM write the nfo which I scrape under Kodi using the setting "Local information only." This works perfectly for TV shows which contain a tvdb ID in the tag "<id>." However, whenever the Kodi scraper comes across a TV show which I have entered manually the <id> tag is empty. The show is scraped alright, but is overwritten with the next item Kodi is scraping. This has the effect that the old tvshow record is replaced by the new one while keeping the same primary key which is used in the episode table. This links the episodes from the previous show to the new one.

I have solved this (perhaps rather naively) by manually entering a fake <id> tag (I just used the number 1 in all cases). I removed all tv shows and scraped again. Perfect result.

I do not know the technical background of this but it seems to work. Although the tvdb ID is not included in the tvshow database record, Kodi seems to somehow remember that it was not included in the nfo file.

Just thought I'd share this.
@khazad7dum

Yes, well spotted.

TV Shows require an <id> tag. This is usually the id at the scraper site. But you can insert any alpha-numeric <id> if you create your own. Unfortunately media manager don't insert this automatically when creating tv shows from local data. There are even some media managers that don't insert an <id> at all.

In case it helps... NFO_files/TV_shows (wiki)