Library cleans itself on auto-background-scan if networked source is offline on boot
#46
jmarshall Wrote:It doesn't exclude anything. The library doesn't care if your files are there or not. The only thing that cares is the scanning process (makes sense, doesn't it) which checks all paths, and removes things that no longer exist from the db.

Short answer: Don't run any scanning processes, and the library will not be touched.

I don't know if something major was changed, but when I run a manual "Update Library" and I've removed something from the source (ie, a folder with TV shows), the log shows NT_STATUS_NOT_FOUND when it looks for that directory, and the entries are not removed from the library. The last time this happened was a T3CH build or two ago (I haven't had to delete anything since), and I ended up just removing the show from XBMC.

Hopefully this is intentional, because I love it!
#47
run088 Wrote:i have multible xboxes and this is a problem i have been running into forever just didnt want to complain about it. i cant help to cure the problem but i can tell you how i get around it. first off i have 5 xboxes in the house 1 in every room on 4 xboxes the auto scan stays on all the time. i build a library on 1 its the protype for the 5. i copy its userdata to the remaining 4 that i have the auto scan turned on on and any additions i do later i do it manually on the protype this way if i lose the data there is always 1 that is still up to date and i can just ftp the userdata back to it and in less than 5 minites im back up again.this is also how i test a new build to see if im going to use it or not.this is the only thing i can think to do and it works quiet well for me my library exceeds 600 titles and 25 tv shows if i were to lose it all it would usually take 2 to 3 days to rescan.

My scan times are much faster since I installed a proxy to cache the pages i scrap localy.

And I run wire. Wire is great. I still don't get all the excitement over wireless.
#48
Quote:Hi Im not to sharp on all this but what if you stored the lib/scraper info on the remote storage eg the nas or pc, if it isnt connected it cant remove anything from it and when its back connected it can read from that file?
...
also then if you have more than one xbox you wont need to scan for each box it will all be there? possibly

I like this idea the best. I think what he means by lib/scraper info is storing the actual SQLite db on the remote hdd, and then having a smaller db (or something, I'm not a programmer) to say "hey, there's a drive here check for it" to xbmc and then xbmc would load the library files from that.

This would also make keeping multiple instances of xbmc synced easier.

If that isn't possible, then simply inserting something like "online.file" onto the drive then having xbmc check for that before removing anything from the library would be best.
#49
the database must be local. no if's, and's, or but's. however, you can copy the entire userdata folder between xboxes without issue. i wont go into detail here, but it is certainly possible to use a python script to automate backing up the userdata folder, and even copying a remote one over.

this is very simple. if your sources are sometimes offline, do not use "update library" unless you are sure they are online. and do not enable "update library on startup". that's just asking for trouble.

and what do you mean by "online.file"? there are many reasons why xbmc cannot accurately tell the difference between a "deleted" file, and an "inaccessible" file (and a file can be inaccessible for several reasons.)

the only real solution to the problem is to have an extra option to disable the removal part of the update process. then it'll be up to the user to manually remove items from the database using the context menu, or by using "clean database" which will ALWAYS remove files whose existence cannot be verified (no matter what the reason.)
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.
#50
By online.file I just mean a dummy file that xbmc can look for to see if the source drive is there.

So image I have a server 'A' with the files "online.file" "Batman.avi" "300.avi"
and server "B" with the files "online.file" "Dexter.avi" "Lost.avi"

Now, I delete "300.avi" and add "DieHard.avi" to the 'A' server, and turn off the 'B' server all together.

I update my library, and xbmc goes looking for "online.file" on each server before doing anything else. It's missing on "B" so it won't mess with anything on 'B' at all since it cannot find 'online.file'

300.avi is removed and DieHard is added as expected.

I hope that makes sense at least, even if it is stupid and/or won't work Rolleyes


Having to use clean library is just so inconvenient because it doesn't run in the background, and can sometimes take FOREVER.

Don't other media centers have to deal with this problem? Surely one of them has come up with an elegant solution....
#51
I have a hack ready to commit. A simple advancedsettings.xml option which will stop the cleaning portion of an update. This effectively makes "update library" exactly the same as "scan for new content" except it does it for all content defined paths. But if you choose to run "clean library", you do so at your own risk.
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.
#52
done...
http://wiki.xbmc.org/?title=AdvancedSett...library.3E
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.
#53
How about making two options of it?
* Scan for new content on startup
* Clean database on startup
#54
Mackan2 Wrote:How about making two options of it?
* Scan for new content on startup
* Clean database on startup

+1
#55
rwparris2 Wrote:By online.file I just mean a dummy file that xbmc can look for to see if the source drive is there.

So image I have a server 'A' with the files "online.file" "Batman.avi" "300.avi"
and server "B" with the files "online.file" "Dexter.avi" "Lost.avi"

Now, I delete "300.avi" and add "DieHard.avi" to the 'A' server, and turn off the 'B' server all together.

I update my library, and xbmc goes looking for "online.file" on each server before doing anything else. It's missing on "B" so it won't mess with anything on 'B' at all since it cannot find 'online.file'

300.avi is removed and DieHard is added as expected.

I hope that makes sense at least, even if it is stupid and/or won't work Rolleyes


Having to use clean library is just so inconvenient because it doesn't run in the background, and can sometimes take FOREVER.

Don't other media centers have to deal with this problem? Surely one of them has come up with an elegant solution....

This is a good idea and would work but wouldn't it be even simpler just to check if a share is online..

eg..

file is on smb://servera/files/video/300.avi..

if //servera is not present.. dont clean the entry..
#56
hey, just came across this thread as I've recently been reorganising all my media so I can use the xbmc library -

i live in a house where I have an xbox in the living room, connected to a smb network that can have between 1 - 6 computers connected depending on who's awake (I can't convince all my flatmates to leave their pcs on at night, nor is it really very energy efficient)

but often i'll lose content i'd normally want in the library

so how about not just have content that is on a pc appear greyed out in the library?

if i was going to code this i'd try and make database entries for content include a field for the machine name the content is stored on, e.g. '//MIKE-PC' etc. or the IP / some other indentifier (this could be deduced from the paths during a library update maybeHuh - i haven't studied the source, I'm just speculating, sorry if this is old ground)

anyway, provided you have some list of the physical sources connected, you'd need a script to run at startup which checks for the presence of each, and sets 'online=1' for content where machines are present or something similar, then in library view make it show things greyed out unless online=1 for that item... make sense?

im not sure how quick that would be - it would need to do work on each file in the database, but it could possibly run in background...

the script could even run periodically whilst the xbox is on, in the background, to keep track of what machines are coming on and off.

sorry if im completely barking up the wrong tree, just saw this thread and thought i'd share in case it's of any use!
#57
Hi,
I have had the opposite problem. It's not really a problem at all. My network is never off as my router is on 24/7 and i never unplug anything from it. Sometimes the PC on which my media is stored is switched off. I have two xbox's running xbmc both auto update on startup. A while back I went crazy and moved some video files from one HD to another. I ended up with 2 copies of all these files in my library. this told me that xbmc detected the new files but didn't realises the old ones weren't there. clicking cleanup library soon fixed the problem.

I just find it interesting that people want library cleanups to be manual only not part of the automatic update of the library, when that seems to be exactly how my xbmc functions now.

Would it not be possible to implement a check into the automatic library update, whereby if no network is found the update doesn't happen, rather than if no network is found assume the files are no longer there and remove them from the library?

Logout Mark Read Team Forum Stats Members Help
Library cleans itself on auto-background-scan if networked source is offline on boot0