Kodi Community Forum
Clarification of "Clean library..." & help to clean DB - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228)
+---- Thread: Clarification of "Clean library..." & help to clean DB (/showthread.php?tid=294011)

Pages: 1 2 3 4


RE: Clarification of "Clean library..." & help to clean DB - WannaTheater - 2017-07-04

Thanks,

1) Sounds like you have "hide watched" enabled-
- No, this is not enabled. "All Videos" is displaying, and movies watched have check marks next to them.

2) Does that movie's folder contain any other videos? Eg trailer, extras etc.
- No. I am having problems reproducing this one.


RE: Clarification of "Clean library..." & help to clean DB - burekas - 2018-03-06

Is there any new here?

Currently I'm doing it manually and remove rows from the database by myself.
Is there anything automatically that can doing it instead?


RE: Clarification of "Clean library..." & help to clean DB - WannaTheater - 2018-03-08

I have multiple “ghost” directories, I.e. directories that have nothing in them. They USED to have movies in them. So they apparently have leftover pointers in the database... even after “clean database.” Remove the directories, and “Clean Database” hangs...


RE: Clarification of "Clean library..." & help to clean DB - mdh99 - 2018-03-15

There's no traction for an actual database clean; shame.

I ended up using the WatchList add-on to backup my watched items and just dropped the MyVideoXXX table.


RE: Clarification of "Clean library..." & help to clean DB - Karellen - 2018-03-15

(2018-03-15, 01:12)mdh99 Wrote: I ended up using the WatchList add-on to backup my watched items and just dropped the MyVideoXXX table.
You could have also exported your library, dropped your databases and then imported... https://kodi.wiki/view/Import-Export_library


RE: Clarification of "Clean library..." & help to clean DB - mdh99 - 2018-03-16

(2018-03-15, 01:17)Karellen Wrote: You could have also exported your library, dropped your databases and then imported... https://kodi.wiki/view/Import-Export_library 
 Why would I do that? That would just export and import all the junk.


RE: Clarification of "Clean library..." & help to clean DB - Karellen - 2018-03-16

(2018-03-16, 04:55)mdh99 Wrote:
(2018-03-15, 01:17)Karellen Wrote: You could have also exported your library, dropped your databases and then imported... https://kodi.wiki/view/Import-Export_library 
 Why would I do that? That would just export and import all the junk.

Ok, if you say so.


RE: Clarification of "Clean library..." & help to clean DB - mdh99 - 2018-03-16

(2018-03-16, 05:16)Karellen Wrote: Ok, if you say so. 
 You could explain or you could just be a jerk; it's up to you.


RE: Clarification of "Clean library..." & help to clean DB - Karellen - 2018-03-16

With that attitude, I have no intention of explaining anything.

First warning applied.


RE: Clarification of "Clean library..." & help to clean DB - mdh99 - 2018-03-16

Ok, if you say so. <--- No attitude there at all.

Hypocrite!


RE: Clarification of "Clean library..." & help to clean DB - WannaTheater - 2018-03-26

Wouldn't reimporting the database change the "Date Added" field to all be the same?
This would not fly well with the family that likes to sort by what things were most recently added.

While this may be a workaround, isn't this viewed as a bug?  Shouldn't "Clean Database" remove entries that no longer exist (files no longer exist, source directories deleted, etc)?
Or am I misunderstanding what "Clean Database" does?


RE: Clarification of "Clean library..." & help to clean DB - DGenerateKane - 2018-04-08

I'd like to see Team Kodi actually address this as well. I haven't been able to clean my library in over a year, because it keeps crashing on me. I've removed every single entry associated with my old NAS in my database, and it does get much farther before crashing. The debug logs are completely useless, as it seems to crash before actually reporting anything useful. The only possible suspect entries reference youtube videos. Why are youtube videos being stored in the database? Am I going to have to remove every single youtube entry from my database now too? I'm spending an inordinant amount off time removing entries that SHOULD be removed with the Clean Library function. My library is a fucking mess right now.

Edit: No, the youtube entries were not the culprit. Kodi works for less than two minutes cleaning the library, moving the progress bar to the very end, before hanging. The log never records what is going on, because it's frozen.


RE: Clarification of "Clean library..." & help to clean DB - Karellen - 2018-04-08

(2018-03-26, 16:53)WannaTheater Wrote: Wouldn't reimporting the database change the "Date Added" field to all be the same?
No. You have the option of changing which date is used. See here... https://kodi.wiki/view/AdvancedSettings.xml#videolibrary


RE: Clarification of "Clean library..." & help to clean DB - DGenerateKane - 2018-04-08

(2018-03-15, 01:17)Karellen Wrote:
(2018-03-15, 01:12)mdh99 Wrote: I ended up using the WatchList add-on to backup my watched items and just dropped the MyVideoXXX table.
You could have also exported your library, dropped your databases and then imported... Import-Export_library (wiki) 
I did that basically (I created a new mysql database so I could go back to the old when this inevitably didn't work) and that just made things worse for me. I exported the entire video library, but when I imported it to the new mysqldatabase I lost 90% of my TV Shows. What's worse, when I tried to go back to the old database, my library is still the new one missing all my shows. I don't know why either, since I was careful which one I had in the advancedsettings.xml. Updating the library only found a few more shows before hanging.


RE: Clarification of "Clean library..." & help to clean DB - Karellen - 2018-04-08

Hello @DGenerateKane

It is hard to see why it has failed for you. I have a very large Test library (to help solve issues for members, as well as general testing), and i regularly perform a fresh start on my test machine and rebuild the library by exporting then importing (2-3 times a week, depending on how many queries I answer). Never had an issue.

Maybe you still have the log available that you can upload? Or if your setup is still broken, re-create the import with debug mode enabled and upload the log. Without further details, it is hard to offer advice on what may have gone wrong.


---Edit---
I performed the export-import three times today, while testing a PR. There were no issues. Though I don't use MySQL, so don't know the outcome as it is advertised as an experimental feature.