2015-08-28, 19:32
(I'm posting this in the OS independent forum because this is a database "fix" so it should work with any OS.)
When I deleted a TV show or movie from my library, it would reappear every time I updated my library. When I clicked "i" (info), it shows a path that shouldn't be listed as a source. When I looked at my sources.xml file, the source/path isn't listed. Deleting my library and starting over might have fixed it, but I didn't want to do that; my library is just way too complicated with way too many sources.
Anyway, if you have this problem, all you need to do is open your My Videos database file (in my case, on my windows machine, it is %APPDATA%/Kodi/userdata/Database/MyVideos93.db) find the "path" table and delete all of the paths that shouldn't be there. That's it.
For me, since I'm on a windows machine, this meant installing a program called "DB Browser for SQLite", clicking "open", navigating to the .db file above, selecting "Browse Data", Selecting "Path" at the "Table:" dropdown and then clicking the "path" header so that the paths would be listed alphabetically. Then I just highlighted them and click "delete record". I actually found quite a few redundant/bad source directories so now my library update takes about half the time.
Now, for some reason I got a missing file error when I went to run Kodi again so I just reinstalled it. I've only been using Kodi for about a week so that part was no biggie because reinstalling doesn't mess with your library.
I'm sure there's a better way to do this but since I have zero knowledge of how databases actually work this is how I did it. Maybe someone reading this who knows more could come up with a simple command line that'll do the same thing or maybe make an add-on that can browse/delete the sources directly. I know when searching for this problem I didn't find a solution other than "start over".
Hope this helps.
When I deleted a TV show or movie from my library, it would reappear every time I updated my library. When I clicked "i" (info), it shows a path that shouldn't be listed as a source. When I looked at my sources.xml file, the source/path isn't listed. Deleting my library and starting over might have fixed it, but I didn't want to do that; my library is just way too complicated with way too many sources.
Anyway, if you have this problem, all you need to do is open your My Videos database file (in my case, on my windows machine, it is %APPDATA%/Kodi/userdata/Database/MyVideos93.db) find the "path" table and delete all of the paths that shouldn't be there. That's it.
For me, since I'm on a windows machine, this meant installing a program called "DB Browser for SQLite", clicking "open", navigating to the .db file above, selecting "Browse Data", Selecting "Path" at the "Table:" dropdown and then clicking the "path" header so that the paths would be listed alphabetically. Then I just highlighted them and click "delete record". I actually found quite a few redundant/bad source directories so now my library update takes about half the time.
Now, for some reason I got a missing file error when I went to run Kodi again so I just reinstalled it. I've only been using Kodi for about a week so that part was no biggie because reinstalling doesn't mess with your library.
I'm sure there's a better way to do this but since I have zero knowledge of how databases actually work this is how I did it. Maybe someone reading this who knows more could come up with a simple command line that'll do the same thing or maybe make an add-on that can browse/delete the sources directly. I know when searching for this problem I didn't find a solution other than "start over".
Hope this helps.