xbvr icon indicating copy to clipboard operation
xbvr copied to clipboard

Unable to remove file from files database

Open sharkysi opened this issue 1 year ago • 13 comments

Screenshot 2023-09-22 105744 Files remaining in the file database even though they have been removed from the storage device. Even after re-scanning the folders the files remain in the database, Clicking on delete does not remove them (see screenshot)

Yes this is a duplicate of #149 and #373 (not the same as #141) , both of these have been closed but the issue remains. happy to provide more details

sharkysi avatar Sep 22 '23 10:09 sharkysi

This is not a xbvr issue. You are scanning your RECYCLE BIN. This is not a dupe of #373 (which it looks like I said was a dupe of #141 instead of #149) or the other two.

theRealKLH avatar Sep 22 '23 12:09 theRealKLH

I also have files from other folders (not recycle bin) with the same issue

sharkysi avatar Sep 22 '23 12:09 sharkysi

Screenshot 2023-09-22 131619 The 3rd file does not exist as was deleted externally (via file explorer), but still showing in the list even after rescanning, and then also removing the folder from the storage list and rescanning all folders. The key seems to be around the functionality behind the delete button. If you click it and the file exists, it deletes it from the storage and removes it from the database, if you click it and the file no longer exists, the file remains in the database list. Have tested this with about 18 files now and all the same, they do not exist on the storage, they are still in the database, but using the delete function, or rescanning does not remove them from the database. Hope this helps (p.s. loving this app though, massive kudos to the team that have put this together, long may it continue) - Lesson I have learnt is to let the app delete going forward, but now have these remaining entries in the list that cannot be removed

sharkysi avatar Sep 22 '23 12:09 sharkysi

when I delete a file.. ex. 18.mp4 image

it is gone after I rescan.. image

theRealKLH avatar Sep 22 '23 13:09 theRealKLH

That is definitely not happening on my instance for some reason.. very odd

sharkysi avatar Sep 22 '23 13:09 sharkysi

could it be because I have removed the folder and re-added it to the storage list while the file is on the db?

sharkysi avatar Sep 22 '23 13:09 sharkysi

The key seems to be around the functionality behind the delete button. If you click it and the file exists, it deletes it from the storage and removes it from the database, if you click it and the file no longer exists, the file remains in the database list. Have tested this with about 18 files now and all the same, they do not exist on the storage, they are still in the database, but using the delete function, or rescanning does not remove them from the database. Hope this helps (p.s. loving this app though, massive kudos to the team that have put this together, long may it continue) - Lesson I have learnt is to let the app delete going forward, but now have these remaining entries in the list that cannot be removed

ALL my deletes are done outside of xbvr or HereSphere. I don't allow deletes from within. So I'm no help on this one. I understand people love this delete functionality, but I just don't get it. (grin)

I would think that if you do rescan when volume is not there, it won't "delete" files in DB because there is no access to the volume at that time (IIRC these would show up in "Downloaded" but not in "Available right now"). But I could be wrong in my thinking. I have not tried it (along with deleting within apps).

theRealKLH avatar Sep 22 '23 13:09 theRealKLH

Have you tried any of the caching options? maybe "Refresh scenes"?

theRealKLH avatar Sep 25 '23 12:09 theRealKLH

yeah tried that

sharkysi avatar Sep 25 '23 12:09 sharkysi

have you looked at the log file to see if there are any errors?

Example.. when I hit delete button inside xbvr time="2023-09-30T15:59:40Z" level=error msg="Error deleting file %!(EXTRA *fs.PathError=remove /xpr0nvr/perVRt/preview/7.mp4: read-only file system)"

theRealKLH avatar Sep 30 '23 16:09 theRealKLH

The log does not even register the attempted delete (like your example) which is odd. Tried to delete a number of files several time and was expecting to see around 20 or so error messages....but nothing. Only the activities around those actions (scanning etc) based on the log times

sharkysi avatar Oct 02 '23 10:10 sharkysi

I have also had a file I couldnt get rid of... It was for a first test. After mounting a different path on the folder (/videos) I couldnt delete it. The log said something like "Deleting file /videos/test/test.mp4" and after a few seconds "Lost " I tried to create a dummy file with the same name and (sub)path. That did the trick. The file was deleted and the entry in XBVR disappeared. It seems XBVR only removes the file in its DB when it could either access and delete the file or, at least, acess the path where the file was (there is no folder "test" in my current library).

I think the delete button should remove the file entry from db, regardless if the file can be deleted/accessed or not. Maybe even offer the choice in the following dialog to delete the file physically or not.

Korben22 avatar Mar 25 '24 13:03 Korben22

I'm trying to handle this issue at the moment, I did some spring cleaning that involved renaming / moving / deleting files outside of xbvr and now just have a bunch of ghost entries I have been unable to remove, I have tried:

rescanning folder in storage section removed folder and readded folder then rescanned removed folder, renamed folder, readded reset search index and rescanned in the cache section scene status - refreshed scenes I tried created dummy file matching the ghost entry and tried to delete via files section delete button and this didn't even work

infact now when I renamed the folder back to its original name and readd it scans the wrong number of files, only showing the right number when its renamed.

Unclear how i'd resolve this.

edit

after looking at some of the stuck dupes theres a chance this was related to case sensitivity, some paths I may have removed and readded with an upper / lower case drive letter and it seems to not realised they should be the same thing

knapman avatar May 07 '24 17:05 knapman