1

How can I rebuild my KODI library from the scratch? For instance, I have some movies which are indexed as TV shows and vice versa. Manually updating those files is not an option.

I could delete all metadata in the directory, but I do not want to loose all my media sources.

What options do I have?

I have tried this here: https://www.pwrdown.com/kodi/clean-kodi-library/ But somehow the movies and TV shows are not empty thereafter.

Go into your Kodi settings menu
Select “Media Settings”
Make sure that your settings level is set to “Expert”
Go into the Library tab and select “Clean library”
In the next window, pick yes.

Solution:

Deleted the DB from the directory as in https://superuser.com/a/490212/72397 (actually deleted the whole DB directory). Directories are here: https://kodi.wiki/view/Kodi_data_folder After that reassigned media type to media sources.

4
  • 1
    have you ever performed a loose-file backup of your library? are you seeing metadata files mixed in with your content files? library cleaners are only going to remove files from the index that no longer exist at the path the index indicates. Mar 21, 2023 at 21:06
  • 1
    you are almost certianly going to have to either delete your media sources or remove any paths you have added to them and then clean the library to start from scratch. the reason I asked about loose file backups, is that if you did back your lib up using this method, then when you recreate your media sources, the contents will scan exactly like they did at the time of the backup, since you put the metadata in the content library itself. if you've never backed up this way then deleting and recreating the media sources should work. Mar 21, 2023 at 22:15
  • What I have done: Indexed one disk as MOVIES and another time as TV SHOWS. So I have some duplicates and some very weird entries, e.g. some German TV Shows appear as Japanese movies. I have never updated anything so far as I just have started with KODI. I have renamed some files to achieve better results, this seems to have to work. However, I have never expected that re-indexing might be a problem. Mar 21, 2023 at 22:56
  • 1
    ok sounds like you will have smooth sailing then if you remove your media sources, clean, and then readd them. if you are looking at the Files view rather than your library, be careful about the "change content" context menu option, because you can tell an item in your movie disk to use the TV parser and vice versa. my guess is thats how things got messed up. Also note that TVDB has some movies in it, and MovieDB has some shows in it. you will have to rename some items to make kodi work best. believe me, I tried to avoid doing that for far too long, and it just doesn't work all the time. Mar 21, 2023 at 23:31

1 Answer 1

1

The purpose of Clean library was never to delete everything from the database. Its purpose was to match the entries to the physical files and remove library items pointing to non-existent file, so removing items that no longer exist.

That said, this command is very old in Kodi and has never worked well. Its behavior and effectiveness is unpredictable.

If you wish to remove anything from the library, you will need to do so manually.

1
  • 1
    I deleted the database from the directory and then had to set the type of the media sources again. Clumsy, but still easier as to go thru all files. Mar 22, 2023 at 1:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .