How to remove invalid entries from movie library?

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
giaur Offline
Fan
Posts: 480
Joined: Nov 2011
Reputation: 1
Post: #1
Hello,

I have one folder containing movies and its content type is set to Movie. This is ok, there are movies available in media library. But, if I remove some files from this folder, they will not be removed from library. Even if I refresh library (or it will be automatically refreshed), still invalid entries are not deleted. I need to delete all library data, set folder's data content type to None and set it to Movies again and rebuild entire library.

Is this possible to scan media library and only delete invalid entries? (invalid = file deleted), without destroying all other data? I have a lot of movies and scrapping info for them takes very long time, so I want to avoid to delete library and create it again.
(This post was last modified: 2012-08-21 13:04 by giaur.)
find quote
spiff Offline
Retired Developer
Posts: 12,386
Joined: Nov 2003
Post: #2
system -> video -> library -> clean library.
find quote
homevolution Offline
Junior Member
Posts: 3
Joined: Aug 2012
Reputation: 0
Post: #3
(2012-08-21 13:06)spiff Wrote:  system -> video -> library -> clean library.

This does not seem to be the case any more ... I had over 2000 entries in my library when I moved the content from one location to a new location during a re-organization. I had to write a perl script to check the sources.xml file and remove any entry that is not located in the paths defined there.

Shout if you want the script. It only does video for now. Still working on the other media types.

Henti
find quote
Vaikin Offline
Posting Freak
Posts: 861
Joined: Mar 2012
Reputation: 25
Location: Toronto, Canada
Post: #4
By changing location you'd have to change the source location for the videos.

Invalid movie entries are definitely removed by system->videos>clean, as I just did it myself not 2 days ago...
(2012-08-26 08:46)homevolution Wrote:  This does not seem to be the case any more ... I had over 2000 entries in my library when I moved the content from one location to a new location during a re-organization. I had to write a perl script to check the sources.xml file and remove any entry that is not located in the paths defined there.

Shout if you want the script. It only does video for now. Still working on the other media types.

Henti
find quote
homevolution Offline
Junior Member
Posts: 3
Joined: Aug 2012
Reputation: 0
Post: #5
I was trying to point out that the library cleanup function does not clean up the library based on the correlation between the library and the source list as defined in XBMC.

Hence it's very likely that there is entries in the library that does not get removed by the library cleanup function.

Henti
find quote
Ned Scott Offline
Team-Kodi Wiki Guy
Posts: 21,968
Joined: Jan 2011
Reputation: 293
Location: Arizona, USA
Post: #6
(2012-08-26 09:22)homevolution Wrote:  I was trying to point out that the library cleanup function does not clean up the library based on the correlation between the library and the source list as defined in XBMC.

Hence it's very likely that there is entries in the library that does not get removed by the library cleanup function.

Henti

Library cleanup doesn't care about sources.xml at all, and never has. It only removes things that have been added to the library. Sources only tell XBMC where to scan for things to add to the library. Once something is in the library then the file path is stored in the library database.

If you change a source that has been previously set to "set content"/populate the library, XBMC will ask you if you want to update the library.

You can make easy links to the XBMC wiki using double brackets around common XBMC words: [[debug log]] = debug log, [[Video library]] = Video library, [[SMB]] = SMB , [[userdata]] = userdata, etc
(This post was last modified: 2012-08-26 11:49 by Ned Scott.)
find quote