Exclude sources when cleaning library
#1
Hi everybody. First of all, you guys are doing an amazing job with this software. I love you so much! Smile

I miss a feature in the treatment of video database, to handle removable drivers on library management. If you have a couple of usb hard disks with movies, and you do a "library clean", you lose information about the movies that are not mounted at that moment. I would like to be able to set these sources not to being included on the process.

I find three different ways to do this:

1. To add a contextual menu entry on video sources. Something like "Clean this source". If I do a "manual" management on the files on that source, I could launch this proccess to scan the source and remove from library only the movies on that source.

2. To add a new field to the sql table "path", something like "excludeOnClean". When I add a source, I could set this flag "on" at the user interface, (like the exclude, or the noUpdate flag).

3. To interpret the existing flag "noUpdate" also as the "noExcludeOnClean" field at point 2. All my removable devices would be checked with "Exclude from updates", and, when I clean the library, I will not lose all the information on those sources. If I actually want to clean the source, I could edit the source entry, unmark the check, and launch CleanLibrary.

I find the last way very easy to implement, only adding "and noUpdate = 0" at the sql filter at line 6456 on function ClearDatabase on VideoDatabase.cpp:
sql = "select * from files, path where files.idPath = path.idPath and noUpdate = 0";

I recompiled the source code on linux and it worked like a charm for me Wink

Of course, I know it changes the real behavior of the clean process, but there is something that, somehow, I find more user friendly. I felt a little disturbing the first time I did a "cleanlibrary", and lost information of my usb drive marked as "Exlude from updates", not mounted at that moment. Maybe, this change of behaviour could be considered as an option on advancedsettings.xml.

What do you think about it?
Reply
#2
While I agree in some respects that the "noUpdate" field could also be interpreted as a "don't clean either", the rest of it is IMO making up for default stupidity in the clean rather than anything else.

After all, if an entire drive isn't present I think we can make the conclusion that cleaning is not what the user is after.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
this would be really useful for anyone with sources on removable drives
Reply

Logout Mark Read Team Forum Stats Members Help
Exclude sources when cleaning library0