Not sure if this is truly just a Vero V issue, but since I got my two new V units, my shared media database is kind of a mess, seemingly having duplicate entries for each and every TV episode, due to the scrape/scan via TVDB v4 running twice in succession, every time I ask for a media update. Each entry looks to be an identical mirror of the other one, so while it isn’t terrible, the watched-status and related data does NOT seem to copy over…they seem to be actual independent entries, even though they both refer to the exact same episode/file. (Movie scrapping, at the same time, seems fine…it only runs once, with one entry per movie.)
This never happened with the older Vero 4k+s we had around the house. Both of the newer Vero Vs exhibit this duplication/run-twice issue with TV series/shows.
If you changed anything about the path to your media and updated the sources, there’s a really good chance you’ve ended up with two sources in the database that will keep updating. There aren’t any good solutions if you get things in that state except to restore from an old backup and make sure you don’t change your sources or delete the databases and start again from scratch.
The details you provided on your setup are a bit thin but I’d venture a guess that your sources.xml may not be identical between what you were using before if you are using an existing MySQL db or else not identical between your two Vero V’s and your running a library update on both. Or else maybe you somehow configured two different sources using two different paths that lead to the same place or a path with a symlink that is doing the same or similar. If you bring up the info screen on two of these duplicates and highlight the “refresh” option what are the exact files paths shown? Are they different?
I hear you, that’s kind of what I thought too, but…
This is a fresh, brand new install, on the new Vero Vs. As a test, I removed a few TV series from the shared database, and after a few reboots, they continue to not show up. My thought was that this could/should remove any old/previous paths or the like. When I then run a media update, I see the notification for MOVIES going first, it runs for a bit, catches any new movies added, then slides over to the TV scrape. I watch that notification window, it works fine, grabs the series I had removed earlier (great!) and then…finishes and immediately runs again, adding the same series a second time.
I guess I can completely nuke the database and start from scratch, but would lose much of my earlier watch-statuses and the like. My guess is the duplication is from it running twice. Do you think it is running twice due to some other setting I may have had on the old Vero 4K+ (no longer connected to the network)??? Doubly odd, as the MOVIE portion of it all seems to work perfectly, running just once, and working with the old data, etc.
You can delete the source that has the file path you don’t want and select the option that comes up asking if you want to remove the files from that source. If the situation got that way from someone modifying a sources file path they can just add a new source again using the original file path.
I’ve never seen Kodi do this. Can you upload logs after rebooting twice and running a library update.
It won’t. The modification of the database happens in real time when you change things. Reboots change nothing in this regard.
You can always tell Kodi to export the database as separate files and it will store the current watched status in the nfo files it creates. The current default option in Kodi is to import that watched status when scraping new entries.
This is a new one on me, but then again I can’t say I have ever setup Kodi via ftp either. It is only doing a single scan but it is rolling through the TV folder and then have a second go around…
2023-09-26 16:38:29.687 T:3043 debug <general>: VideoInfoScanner: Skipping dir 'ftp://192.168.1.11:40021/Media/TV/1883/' due to no change
2023-09-26 16:39:28.612 T:3043 debug <general>: VideoInfoScanner: Skipping dir 'ftp://USERNAME:**email@example.com:40021/Media/TV/1883/' due to no change
It looks a bit to me like it is scanning the path as with and without the password path substituted into it as two seperate paths. I’m not sure why this would be. I had a look in Kodi’s wiki and it shows a proper ftp source as having the credentials included in sources.xml instead of them being inserted later via passwords.xml as it would be properly done with something like a SMB path. I don’t know if this is a outdated wiki, is a technical limitation, bug, or something else. I suppose you could try pulling the substitution from passwords.xml and adding the credentials to the entry in sources.xml which I suspect would work, even if not optimal.
I’d also really be interested in any thoughts @pkscout has on what these logs show.
2023-09-26 16:39:28.107 T:3043 debug <CAddonSettings[firstname.lastname@example.org]>: trying to load setting definitions from old format...
2023-09-26 16:39:28.111 T:3043 info <general>: CCurlFile::Stat - <ftp://USERNAME:**email@example.com:40021/Media/MusicVideos/> Content length failed: No error(0)
2023-09-26 16:39:28.112 T:3043 debug <general>: CurlFile::Open - <ftp://USERNAME:**firstname.lastname@example.org:40021/Media/MusicVideos/>
2023-09-26 16:39:28.160 T:3043 debug <general>: VideoInfoScanner: Skipping dir 'ftp://USERNAME:**email@example.com:40021/Media/MusicVideos/' due to no change
2023-09-26 16:39:28.170 T:3043 debug <general>: CurlFile::Open - <ftp://USERNAME:**firstname.lastname@example.org:40021/Media/TV/>
If you follow the long log through, you can see it scan the “Movies” (once) then “TV”, then, as shown above, right after the final TV series…it starts TV scanning again. I’m guessing there is some hidden character or something I can’t see with my eyes that leads the system to believe there is a completely different directory or path, so it goes on checking that location, adding what seems like exact copies of the first scan to the library.
Anyway, if anyone has any thoughts on how to remove that second entry, or otherwise clean things up, it would be appreciated. Not the end of the world, but having two entries for every episode, only one showing watched status, etc. is kind of messy, but livable. Thank you!
What Kodi is grabbing when doing the scan is in /home/osmc/.kodi/userdata/sources.xml and you can edit it outside of Kodi without an issue as long as you don’t screw up the syntax. There is another file in the same folder called passwords.xml and what that file does is list substitution pairs so you can have, for example, a source added without a username@password and when it sees the text string in the substitution pair it can add it in on the fly. This not only keeps the credentials from being stored in the database but it also simplifies changing the credentials since you would only need to modify this one xml file instead of change the source and editing a bunch of entries in the database.
Do note that changing sources.xml only modifies what gets scraped in the future and Kodi will not automatically modify or remove existing library items just because that file changed.
Also note that if you want to experiment a bit you can do so on a virgin db just by changing the name tag in your advancedsetting.xml and restarting Kodi. You can then go back to your original database you were using just by changing the name tag back to what it was before. Your Thumbnails folder is going to ballon up a bit by doing this bug you can safely delete that at any point and it will rebuild on its own.