remove all titles without files from library
#1
How can I remove all titles from my library, where the corresponding file does not exist any more?

Example:
  1. add file Booby.Traps.1944.DVDRip.XviD.avi to video source
  2. update library, get title "Booby Traps (1944)"
  3. add file Booby.Traps.1944.1080p.BluRay.x264.mkv to video source
  4. update library, get second title "Booby Traps (1944)"
  5. delete Booby.Traps.1944.DVDRip.XviD.avi from video source
  6. Huh
  7. result: have only one title "Booby Traps (1944)" in library
I can do this manually, by removing invidivual titles.
However, I am trying to do this for all titles with non-existent files at once.

I am aware that there is a danger of purging an entire library, f.e. when an external hard drive is accidentially not plugged in or mounted.
This is why the option clean library does in fact not do this, even though it sounds exactly like what I want. But it doesn't.

I have searched and found this question asked many times. Unfortunately, I was not able to find the correct answer. Smile

Thanks!
Reply
#2
(2021-05-05, 18:45)ilf_ Wrote: However, I am trying to do this for all titles with non-existent files at once

How many movies do you think that have to be removed manually?
Because it could be a simpler and faster solution than juggling with multiple drives and the Clean Library function.
Reply
#3
(2021-05-05, 18:54)Klojum Wrote: How many movies do you think that have to be removed manually?
Because it could be a simpler and faster solution than juggling with multiple drives and the Clean Library function.
Thanks for the reply.

I'm not sure the exact number is relevant, let's assume 50 titles out of a library with 1000. The point is, I am trying to find the answer how to do this for all files at once, because I was not able to find the answer before.

I'm not sure what you mean by "juggling with multiple drives", but the "clean library function" does not do what I am trying to do. (I understand I need to do that after removing them.)
Reply
#4
Well, the problem is that videos from disconnected drives can be inadvertently be removed from Kodi's library. Kodi's "AI capabilities" are not yet up to par in that regard.

How many separate HDDs are scraped into your video library?
50/1000 movies is a manageable amount, I'd say.
Reply
#5
I understand the danger of accidentially removing all titles from a non-mounted source. I said that im my first post.
That's why I would not do this automatically (like on boot), but after evaluation and confirmation.

But I am still wondering how to do it. I'm sure one does not need "AI" for that.
Reply
#6
Klojum: Thanks for your trying to help. But I would really appreciate an answer to the question "how to do this task with software" that's not "don't do it with software, do it with manual human labor". :)
Reply
#7
If you check out texturecache.py which is a python script (not addon) you can run it with
Code:
texturecache.py qa movies @qafile=yes @qaperiod=9999 @qa.art.movies=
and get a list of movies with missing files.  I think you could probably pipe that output back to texturecache to remove the library entries, but best to ask in the texturecache thread.

scott s.
.
Reply
#8
(2021-05-09, 00:36)scott967 Wrote: If you check out texturecache.py which is a python script (not addon)

Thanks, "texturecache.py vclean" seems to have done what I want.

However, this is weird, because supposedly it does the same thing as the Kodi GUI "clean library" option, which is not doing what I want.

If anyone can help me understand the difference, I posted the details in the texturecache.py thread.

Thanks.
Reply

Logout Mark Read Team Forum Stats Members Help
remove all titles without files from library0