Skip to content
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

[Bug]: Deleted Genres & Tags re-appear after re-scan of the library #3649

Open
b3nd1k opened this issue Nov 25, 2024 · 4 comments
Open

[Bug]: Deleted Genres & Tags re-appear after re-scan of the library #3649

b3nd1k opened this issue Nov 25, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@b3nd1k
Copy link

b3nd1k commented Nov 25, 2024

What happened?

Through the WebUI, I navigated to Settings -> Item Metadata Utils. Under the section Manage Tags and Manage Genres I deleted a large amount of unnecessary tags, as well as merging tags and genres that have similar names. For example, Fiction Books, Fiction, Fictional was merged into Fiction.

What did you expect to happen?

I expected the changes and removal of genres and tags I made to remain after a re-scan of the library. I have the "Store metadata with item" option checked under Settings, but I assume what happens is that the changes I made are not written to the metadata file, so that when the re-scan appears it adds the information back.

Steps to reproduce the issue

To reproduce the issue, go to Settings -> Item Metadata Utils and either remove or rename any tags. After re-scanning the library, you will notice that the removed or renamed tags reappear.

Audiobookshelf version

v.2.17.2

How are you running audiobookshelf?

Docker

What OS is your Audiobookshelf server hosted from?

Linux

If the issue is being seen in the UI, what browsers are you seeing the problem on?

Firefox

Logs

No response

Additional Notes

No response

@b3nd1k b3nd1k added the bug Something isn't working label Nov 25, 2024
@advplyr
Copy link
Owner

advplyr commented Dec 1, 2024

I'm not able to reproduce this issue. I can see that the tag gets removed from the metadata.json file.

Maybe the tags are getting pulled from another file during the scan. Do you have an OPF file or an NFO file with that book?

@advplyr advplyr added waiting Waiting for OP unable to reproduce Issue is not yet reproducible labels Dec 1, 2024
@b3nd1k
Copy link
Author

b3nd1k commented Dec 2, 2024

Do you have an OPF file or an NFO file with that book?

You're probably on to something. The path of the my eBook library in ABS is pointed to my Calibre eBook library. Under Scanner, I have given the Audiobookshelf metadata file a higher priority than OPF file. The thought was that ABS would pick up the metadata from the Calibre library on the initial scan, but then ignore changes to the OPF-file on additional scans.

Am I correct to assume that when I delete a tag from Item Metadata Utils, the Audiobook metadata field for tags goes blank and re-import the tags from the OPF file, rather than locking that field to be blank? Since I have Audiobook metadata field_ set higher than the OPF file, the expected behaviour would be that ABS prevents the tags from getting re-added.

Screenshot 2024-12-02 at 08 19 31

@advplyr
Copy link
Owner

advplyr commented Dec 2, 2024

This is a decision we have to figure out how to best implement. For the case of genres, tags and chapters if they are empty in the metadata file they are ignored, meaning it will not overwrite with an empty array.

I think you're right in assuming it should though. For the case of narrators and series the metadata file will take precedence and keep them empty. There was just a PR opened to make narrators and series behave like genres, tags and chapters. #3671

@b3nd1k
Copy link
Author

b3nd1k commented Dec 2, 2024

From what I can tell, there seems to be different opinions on how to best handle this issue. The way I see it is that this is by the order of precedence. If Audiobookshelf metadata file is higher than the OPF file it will remain black, if not, it will re-import.

@advplyr advplyr removed waiting Waiting for OP unable to reproduce Issue is not yet reproducible labels Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants