mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-05-30 23:40:40 +02:00
[Enhancement]: Rename metadata.json files to something less generic, and add a "file format version" of some sort in the file
#1230
Reference in New Issue
Block 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 @CLHatch on GitHub (Jul 2, 2023).
Describe the feature/enhancement
Is your feature request related to a problem? Please describe.
Currently, when storing metadata alongside the books, it uses the filename
metadata.json. This is a very generic name, and I know of at least one other app that uses that same name. This could cause an issue where the file gets over-written by another app at some point. Also (sort of a second feature request, but somewhat related), there should be a field in the file saying what "file format version" the file is. This could tell people looking at the contents of the file that it is foraudiobookshelf, and also help you later if you need to migrate to a new file format. I believe the oldmetadata.absfiles had something like this in a comment at the top of the file.Describe the solution you'd like
Change the filename used to something like
absmetadata.json, ormetadata_abs.json, etc. For the second part, just add a field in the file saying it's foraudiobookshelfand have some sort of "version number" that would help you down the line with migration (or even to check to be sure it IS for audiobookshelf to begin with before you do anything with it.Describe alternatives you've considered
None, other than being careful that I don't run a program that will over-write the files.