Shortcut to clean library
#1
Any way to create a shortcut to clean the library - same as the option under system > settings > video?

I know I can edit the advancedsettings.xml to automate this on library updates but as I use a network share location on a laptop that is not always on this isn't an option as a clean when the share is not available will result in a lost library!

I would be happy to simply run a library update on start and have a menu / favourite option to clean the library when needed (without having to take all the steps above).

Possible?
Reply
#2
You can use the CleanLibrary(Video) built-in function.
Reply
#3
You could use xbmc library Updater.

I think it now can be set to clean your library etc

http://wiki.xbmc.org/index.php?title=Add...uto_Update
Reply
#4
(2012-12-18, 03:38)artrafael Wrote: You can use the CleanLibrary(Video) built-in function.

Thanks, how can I add that as a shortcut / favourite though?
(2012-12-18, 03:55)quacker1982 Wrote: You could use xbmc library Updater.

I think it now can be set to clean your library etc

http://wiki.xbmc.org/index.php?title=Add...uto_Update

Something like that would be great if there was an option to check for availability of the share first and only run the update / clean if the share is available. Running it when the share is not available results in lost library as above.
Reply
#5
Add this to your favourites.xml (wiki) file in your userdata (wiki) directory:

Code:
<favourite name="Clean video library">CleanLibrary(Video)</favourite>
Reply
#6
(2012-12-18, 04:03)artrafael Wrote: Add this to your favourites.xml (wiki) file in your userdata (wiki) directory:

Code:
<favourite name="Clean video library">CleanLibrary(Video)</favourite>

That's great, thanks!

Just need to find the command for 'scan for new content' to add as a fave now and it's the next best thing to automation!

Tried adding:

<favourite name="Update video library">UpdateLibrary(Video)</favourite>

Doesn't seem to have same effect as scan for new content from the context menu though for some reason.
Reply
#7
(2012-12-18, 04:49)spyda Wrote: Tried adding:

<favourite name="Update video library">UpdateLibrary(Video)</favourite>

Doesn't seem to have same effect as scan for new content from the context menu though for some reason.

That should work. When you selected this favourite, did the update library status message and progress bar show up at the top-right of your screen?
Reply
#8
(2012-12-18, 06:20)artrafael Wrote:
(2012-12-18, 04:49)spyda Wrote: Tried adding:

<favourite name="Update video library">UpdateLibrary(Video)</favourite>

Doesn't seem to have same effect as scan for new content from the context menu though for some reason.

That should work. When you selected this favourite, did the update library status message and progress bar show up at the top-right of your screen?

Strangely, yes it did. All appeared to be doing as it should (as it does on startup) but the only way I could update the library with new content was to go to the VIDEO > FILES section and choose 'scan for new content' from the context menu. Even restarting XBMC to force an update did not work and neither did 'update library' from within the contect menu in the MOVIES section.

Is 'scan for new content' and 'update library' not the same? Seems not to have been in this case ...

This could of course be related to the nightly builds as I am aware these are very much beta.
Reply
#9
"Scan for new content" is different from "update library", and the difference can be very useful.

"Scan for new content" looks at the currently selected folder only, so if you've just added one new movie or show, you can scan that directory and get the update very quickly.

"Update Library" will look at all directories that haven't been specifically excluded from library updates in the Set Content description.

One way that I use this, is that I have a large number of static directories. They never, or almost never change content. So I exclude them from Library updates, because it makes that process go much faster. But every once in awhile, I might add something to them, and I can still update them with "Scan for new content."

Reply
#10
Ah, my setup is not as complicated as that - I have only one shared folder with two sub-folders, Films and TV. Files are removed and added often and for some reason sometimes only the 'scan for new content' option will show up recently added videos whereas other times 'update library' will work fine. Seems to depend on the actual file added.

Having shortcuts to the update and clean options in favourites works well in the absence of anything to automate the process but I can't find the command / parameters needed to 'scan for new content' to add to the favourites.xml file.

Anyone have any idea what the command would be?
Reply
#11
Thanks a lot for the info, this really helped me
Reply
#12
(2013-10-23, 13:51)kevn57 Wrote: Thanks a lot for the info, this really helped me

Me too. Instead of having custom links to scripts in my exit menu, I now have this added into my Favourites menu.

Code:
<favourites>
    <favourite name="Update Library">UpdateLibrary(video)</favourite>
    <favourite name="Export Library">exportlibrary(video,true,true,false,true)</favourite>
    <favourite name="Clean video library">CleanLibrary(Video)</favourite>
</favourites>

From memory, I think the "exportlibrary(video,true,true,false,true)" command tells XBMC to search for new content, and if it finds an existing .nfo, to skip that titles thumbnails fanart etc, (could be slightly off there, but the crux of it I think is correct) makes scraping a lot faster!

Cheers guys!

Edit: Forgot to add, this is using a Raspberry Pi running OpenELEC, principle is the same though
Reply
#13
(2013-10-23, 15:17)evangelion Wrote:
(2013-10-23, 13:51)kevn57 Wrote: Thanks a lot for the info, this really helped me

Me too. Instead of having custom links to scripts in my exit menu, I now have this added into my Favourites menu.

Code:
<favourites>
    <favourite name="Update Library">UpdateLibrary(video)</favourite>
    <favourite name="Export Library">exportlibrary(video,true,true,false,true)</favourite>
    <favourite name="Clean video library">CleanLibrary(Video)</favourite>
</favourites>

From memory, I think the "exportlibrary(video,true,true,false,true)" command tells XBMC to search for new content, and if it finds an existing .nfo, to skip that titles thumbnails fanart etc, (could be slightly off there, but the crux of it I think is correct) makes scraping a lot faster!

Cheers guys!

Edit: Forgot to add, this is using a Raspberry Pi running OpenELEC, principle is the same though

nevermind I figured it out, I had to create favourites.xml and bam! it worked
Reply

Logout Mark Read Team Forum Stats Members Help
Shortcut to clean library0