mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-05-30 23:40:40 +02:00
[Bug]: Audiobookshelf keeps blowing out all user edited metadata and covers #1422
Closed
opened 2026-04-24 23:44:37 +02:00 by adam
·
10 comments
No Branch/Tag Specified
master
book_tags_genres_dedupe
episode_download_fallback
Issue-4540-SortBy-StartedDate-and-FinishedDate
episode_meta_tagging
fix_authorize_race_condition
redirect_transcode_requests
progress_updated_sort
fix_ereader_socket_event
fix_change_empty_root_password
fix_podcast_session_track_index
fix_set_token
session_modal_user
localize_durations
fix_oidc_create_user
jwt_auth_refactor
fix_scanner_deleting_single_file_books
fix_mediaprogress_updatedat_2
experimental_next_client
podcast_episode_duration
episode-timestamps-clickable
book_author_secondary_sort_title
podcast_useragents
pathexists_user_access
fix_pathexists_join
book_author_secondary_sort
clean_duplicate_mediaprogress
sanitize_html_description
trix_prevent_attachments
check_path_api_fix
fix_mediaprogress_updatedat
increase_express_json_limit
fix_dockerfile_nunicode
search_episodes
audiobook_tools_update
episode_secondary_sorts
hls_stream_url_update
new_session_track_endpoint
audiobook_tools_enhancements
watcher_rescans_update
player_track_tooltip
fix_exclude_prefixes_crash
socket_item_events
fix_podcast_episode_scanner_promise
new_stats_controller
count_cache_for_userpermissions
parsing-opf-v3
validate_migration_files
fix-quick-match-all-crash
fix-chapter-end-sleep-timer
stringify_sequelize_query
remove-col-ambiguity
fix_next_prev_edit_description
details_trim_whitespace
fix_content_url_basepath
fix_logger_fatal
progress_bar_visibility
batch-edit-populate-map-details
feed_generator_updates
bookmark-modal-updates
migrate-library-item-in-scanner
migrate-new-library-items
migrate-podcasts-new-library-item-2
migrate-podcasts-new-library-item
fix-remove-episode-from-playlist
playback-session-use-new-library-item
refactor-library-item
fix-heatmap-caption
feed-episodes-upsert
share-media-player-media-session-api
remove-old-playlist
remove_old_collection_object
plugin-implementation-demo
feed_migration
refactor-feeds-from-item
fix_remove_authors_no_books
v2.17.3-fk-constraints-migration
migrations-first-upgrade
sqlite_2
feature/nuxt-target-server
waveform
sqlite
playlists
video
v2.35.1
v2.35.0
v2.34.0
v2.33.2
v2.33.1
v2.33.0
v2.32.1
v2.32.0
v2.31.0
v2.30.0
v2.29.0
v2.28.0
v2.27.0
v2.26.3
v2.26.2
v2.26.1
v2.26.0
v2.25.1
v2.25.0
v2.24.0
v2.23.0
v2.22.0
v2.21.0
v2.20.0
v2.19.5
v2.19.4
v2.19.3
v2.19.2
v2.19.1
v2.19.0
v2.18.1
v2.18.0
v2.17.7
v2.17.6
v2.17.5
v2.17.4
v2.17.3
v2.17.2
v2.17.1
v2.17.0
v2.16.2
v2.16.1
v2.16.0
v2.15.1
v2.15.0
v2.14.0
v2.13.4
v2.13.3
v2.13.2
v2.13.1
v2.13.0
v2.12.3
v2.12.2
v2.12.1
v2.12.0
v2.11.0
v2.10.1
v2.10.0
v2.9.0
v2.8.1
v2.8.0
v2.7.2
v2.7.1
v2.7.0
v2.6.0
v2.5.0
v2.4.4
v2.4.3
v2.4.2
v2.4.1
v2.4.0
v2.3.5
v2.3.4
v2.3.3
v2.3.2
v2.3.1
v2.3.0
v2.2.23
v2.2.22
v2.2.21
v2.2.20
v2.2.19
v2.2.18
v2.2.17
v2.2.16
v2.2.15
v2.2.14
v2.2.13
v2.2.12
v2.2.11
v2.2.10
v2.2.9
v2.2.8
v2.2.7
v2.2.6
v2.2.5
v2.2.4
v2.2.3
v2.2.2
v2.2.1
v2.2.0
v2.1.5
v2.1.4
v2.1.3
v2.1.2
v2.1.1
v2.1.0
v2.0.24
v2.0.23
v2.0.22
v2.0.21
v2.0.20
v2.0.19
v2.0.18
v2.0.17
v2.0.16
v2.0.15
v2.0.14
v2.0.13
v2.0.12
v2.0.11
v2.0.10
v2.0.9
v2.0.8
v2.0.7
v2.0.6
v2.0.5
v2.0.4
v2.0.3
v2.0.2
v2.0.1
v1.7.2
v1.7.1
v1.7.0
v1.6.0
v1.5.5
v1.5.0
v1.4.11
v1.4.9
v1.4.7
v1.4.6
v1.4.4
v1.4.2
v1.4.0
v1.4.1
v1.3.4
v1.3.3
v1.3.1
v1.2.8
v1.2.6
v1.2.5
v1.2.4
v1.2.1
v1.1.15
v1.1.14
v1.1.13
v1.1.12
v1.1.11
v1.1.10
v1.1.9
v1.1.8
v1.0.0
0.9.61-beta.0
0.9.61-beta
Labels
Clear labels
authentication
backlog
bug
chapter editor
config-issue
ebooks
encoding/embedding
enhancement
help wanted
listening sessions & progress
planned
possible plugin
progress sync
pull-request
sorting/filtering/searching
unable to reproduce
upload
users & permissions
waiting
Mirrored from GitHub Pull Request
No Label
bug
Milestone
No items
No Milestone
Projects
Clear projects
No project
Assignees
adam (Adam Melkus)
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: starred/audiobookshelf#1422
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Nitrousoxide on GitHub (Sep 28, 2023).
Describe the issue
Every few days I come back to my audiobookshelf docker install to find that it has reverted the entire audiobook database to an unedited state after doing a scan. I believe the "watcher" scan is reverting all book states to whatever metadata can be gleaned from the directory path and any covers that are in the audiobook directory rather than the metadata fields in the database. I have reverted back to a previous database state and turned off the watcher so I guess we'll see if it still repeats.
I'm not sure what the best way to handle this is. I could obviously disable the watcher, and that's probably fine. I'm not trying to initialize a new audiobook instance anymore from existing directory. But if the intention of the watcher is to overwrite existing metadata with file paths info and the content of the actual file directory you probably want flag that toggle with a warning saying it can be destructive to your audiobook library's metadata.
For me this was pretty destructive since it blew out 300+ audiobooks' metadata. Luckily I keep good backups via dupliciti so I could restore a previous day's state before hours of my work managing the metadata were blown out.
Before the metadata was nuked

Here's a snippet of the log as it destroyed it:
After everything was nuked

The server settings

Steps to reproduce the issue
Audiobookshelf version
2.4.3
How are you running audiobookshelf?
Docker
@advplyr commented on GitHub (Sep 28, 2023):
Metadata should not be getting overwritten (with your server settings) unless you have a
metadata.jsonormetadata.absfile inside the same folder of your books.The watcher doesn't run on a schedule, it will only get triggered when it detects a file has been added or removed from a library folder. Then it will only run the scan on the existing book or new book.
There is an issue relating to covers getting re-extracted from audio files on scans which will explain why covers would be reverted https://github.com/advplyr/audiobookshelf/issues/2110. I've already fixed that for the next release.
I'm not aware of any other details getting overwritten
@advplyr commented on GitHub (Sep 28, 2023):
I just looked through your logs and it appears you are having an issue with your files changing their inode values. Can you share what OS and file system you are using for your books?
Related issue on inodes https://github.com/advplyr/audiobookshelf/issues/1447 but not the same since those are short inodes having collisions
@Nitrousoxide commented on GitHub (Sep 28, 2023):
The container itself is using docker, so whatever base OS that uses.
I have a remote smb/cifs share mounted to the container
which points to a Synology network share (and thus is on a BTRFS file system)
@advplyr commented on GitHub (Sep 28, 2023):
Do you have scheduled library scans enabled? When pressing edit on a library and going to schedule
@Nitrousoxide commented on GitHub (Sep 28, 2023):
Yep
@Nitrousoxide commented on GitHub (Sep 28, 2023):
I just changed my scan schedule to run now as opposed to midnight and it did nuke all my metadata again. So I think it's that not the watcher. I exported my log out too if you want to see it.
2023-09-28_6cb590d6-567f-4f4d-8f88-9f772f630783.txt
@advplyr commented on GitHub (Sep 29, 2023):
I found and fixed the issue here. This is specific to not storing the metadata file with the item and the reason you were running up against it with all of your media is because your file system is changing the inode value. I'll release the patch for the this over the weekend.
This will resolve the issue of metadata being overwritten but the scanner will still report that all of your media got updated because of that inode change. I don't know much about your specific setup but maybe you can configure some setting so that the inode values don't keep changing?
As a side note, the watcher probably won't work for you because of the network file system. That is why scheduled library scans were added so it's normal, just giving an fyi
@Nitrousoxide commented on GitHub (Sep 29, 2023):
Is there a way for the user to switch to storing the metadata with the item? I did try flipping that, but it didn't seem to do anything (at least immediately) so I assume it only does it for new items going forward? If it writes the metadata to the /audiobook file from /metadata at a scheduled time a note in the mouseover might be a good addition. If not bringing up a popup to start the migration might be a good addition.
In my case the faster storage is on the local drive rather than the network share, so I'll probably keep the metadata local to the server for better performance.
I'll turn off scans for the library for now until this update is pushed, and I update for now as a workaround.
@advplyr commented on GitHub (Sep 29, 2023):
The metadata file is written to the new location the next time the details are updated for that book. There is a feature request open I believe for automatically moving everything over. With the upcoming patch it won't matter whether you store it with the items or not so probably best to keep it as you had.
@advplyr commented on GitHub (Sep 30, 2023):
Fixed in v2.4.4