-
-
Notifications
You must be signed in to change notification settings - Fork 340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[nightly] Library scan doesn’t remove non-existent series #3378
Comments
Kavita works by going off the filesystem events to detect changes. If your underlying filesystem doesn't tell kavita something has changed, then we don't know about it. I just removed a folder and ran a scan on the latest nightly to test this:
|
For some reason, Kavita isn’t detecting changes after I delete a folder. Good to know it’s not a bug in the nightly release. I’ll see what I can do to fix this on my end. Thanks! |
I also can't reproduce as I've been deleting a lot of things during my testing. |
After the latest stable release, Kavita still doesn't detect when a series folder is removed during a regular scan from the side nav. I'm running my Kavita server with all files stored on a QNAP NAS. When I delete a file, the QNAP log center logs it as "Deleted." However, Kavita still fails to recognize the change. Currently, my Kavita only detects removed files in the following scenarios:
Can anyone help me identify the problem? It's really frustrating. Thanks in advance! |
Let's do some targeted testing. Delete your log file for the day, then perform the scan where something was deleted. Then attach the logs here. |
Thank you for your help. I have two series folders,
|
Can you also show me whats in the test1 and test2 directories (before you removed test2)? Were they the same series? |
Please run this python script before the deletion of the folder and attach the json that comes from it. This will just create a map of the folders for me to put into a unit test framework I built around this script. Please also give me the library type you have setup. import os
import json
def map_files(root_dir):
files_map = []
for dirpath, dirnames, filenames in os.walk(root_dir):
# Skip directories that start with "."
dirnames[:] = [d for d in dirnames if not d.startswith('.')]
for filename in filenames:
# Skip files that start with "."
if not filename.startswith('.'):
# Get the relative path of the file
relative_path = os.path.relpath(os.path.join(dirpath, filename), root_dir)
files_map.append(relative_path)
# Export the map to a JSON file
with open('files_map.json', 'w') as outfile:
json.dump(files_map, outfile, indent=4)
if __name__ == "__main__":
root_dir = os.getcwd()
map_files(root_dir)
print("File map generated and saved to files_map.json.") |
I run the python script in the test library root folder, here is the json, but I don't think that provide much information
I'm using Book type library for testing. But It also happens to every library type I use (Manga, light novel and Book). |
Thanks, that's all I need from you. When I have time I will mock this up in the code and see if I can reproduce. On my system, deleting folders has not been an issue, hence why this was marked previously as Time is extremely limited for me, so it will be a bit before I can try to reproduce. Also does a force scan not get the series deleted? |
Thank you for taking the time to look into this. I completely understand how busy you are with everything related to Kavita. If there’s anything else I can assist with or clarify, please don’t hesitate to let me know. A force scan will delete the sereis. The series will be removed in the following scenarios:
|
What happened?
To reproduce:
The issue:
The series will not be automatically removed from Kavita. To delete the series in Kavita, you must either scan it from its detail page or perform a force scan on the library. A normal scan does not remove the series.
What did you expect?
Library scan can automatically remove non-existent series.
Kavita Version Number - If you don not see your version number listed, please update Kavita and see if your issue still persists.
Nightly Testing Branch
What operating system is Kavita being hosted from?
None
If the issue is being seen on Desktop, what OS are you running where you see the issue?
None
If the issue is being seen in the UI, what browsers are you seeing the problem on?
No response
If the issue is being seen on Mobile, what OS are you running where you see the issue?
None
If the issue is being seen on the Mobile UI, what browsers are you seeing the problem on?
No response
Relevant log output
No response
Additional Notes
No response
The text was updated successfully, but these errors were encountered: