[Enhancement]: Allow for naming options for cover.* and metadata.json files #1465

Open
opened 2026-04-24 23:46:41 +02:00 by adam · 0 comments
Owner

Originally created by @iconoclasthero on GitHub (Oct 17, 2023).

Describe the feature/enhancement

Whereas GNU Readline in bash (also in PowerShell, can't test in other shells) has tab completion of file names, I have previously‡ named everything in a book directory: /library/books/Last, First/Title: Subtitle (YYYY)/title -- *.* (i.e., with no subtitle). This simplifies manipulation of the files from CLI significantly. I can manually or scripted move all the covers and metadata.json files to title -- Cover.ext and title -- metadata.json, however ABS will only recognize the former, regenerating the metadata.json if the latter is renamed. To resolve this, I would like to have the option of giving the covers and metadata files the same name as the title of the book, which will presumably match the underlying .opus files in my directory solving the tab-completion issue.

As an additional benefit, the covers and metadata files will be named the same as the book so they can be easily identified and grouped with the book should the files get mixed up somehow (e.g., I've accidentally moved everything from all subdirectories somewhere and had to sort out the files—much easier if they're titled!).

If this isn't something that will be done with ABS officially, it would seem this would be a relatively straight-forward adjustment to the code, perhaps you could show me where metadata.json is defined and I could fork abs. It would have to be redone with every update, but as long as the differences aren't major, there aren't that many updates that it would be prohibitive to do.

pwd: /library/books/new/Godwin, William/Enquiry Concerning Political Justice and its Influence on Morals and Happiness (1793) $ ls
⋮
'Enquiry Concerning Political Justice -- Part 94.opus'
'Enquiry Concerning Political Justice -- Part 95.opus'
'Enquiry Concerning Political Justice -- Part 96.opus'
'Enquiry Concerning Political Justice -- Part 97.opus'
'Enquiry Concerning Political Justice -- Part 98.opus'
'Enquiry Concerning Political Justice -- Part 99.opus'
'Enquiry Concerning Political Justice -- Summary.nfo'
'Enquiry Concerning Political Justice -- Cover 01.jpg'
'Enquiry Concerning Political Justice -- Metadata.json'
'Enquiry Concerning Political Justice -- eBook.epub'

vs

pwd: /library/books/new/Godwin, William/Enquiry Concerning Political Justice and its Influence on Morals and Happiness (1793) $ ls
⋮
'Enquiry Concerning Political Justice -- Part 94.opus'
'Enquiry Concerning Political Justice -- Part 95.opus'
'Enquiry Concerning Political Justice -- Part 96.opus'
'Enquiry Concerning Political Justice -- Part 97.opus'
'Enquiry Concerning Political Justice -- Part 98.opus'
'Enquiry Concerning Political Justice -- Part 99.opus'
'Enquiry Concerning Political Justice -- Summary.nfo'
'Enquiry Concerning Political Justice -- eBook.epub'
 cover.jpg
 metadata.json

‡ Previously, I'd organized my files without a second layer hierarchy for the authors (or series) so that it was books/Last, First -- Title: Subtitle/Title -- Part ##.opus so that I would be able to see the titles and subtitles from the command line. ABS basically removes the ability to see the subtitles for books from the web display and the CLI making finding things much more difficult. I basically have to use find for everything now.

Originally created by @iconoclasthero on GitHub (Oct 17, 2023). ### Describe the feature/enhancement Whereas GNU Readline in bash (also in PowerShell, can't test in other shells) has tab completion of file names, I have previously‡ named **everything** in a book directory:` /library/books/Last, First/Title: Subtitle (YYYY)/title -- *.*` (i.e., with no subtitle). This simplifies manipulation of the files from CLI significantly. I can manually or scripted move all the covers and metadata.json files to title -- Cover.ext and title -- metadata.json, however ABS will only recognize the former, regenerating the metadata.json if the latter is renamed. To resolve this, I would like to have the option of giving the covers and metadata files the same name as the title of the book, which will presumably match the underlying .opus files in my directory solving the tab-completion issue. As an additional benefit, the covers and metadata files will be named the same as the book so they can be easily identified and grouped with the book should the files get mixed up somehow (e.g., I've accidentally moved everything from all subdirectories somewhere and had to sort out the files—much easier if they're titled!). If this isn't something that will be done with ABS officially, it would seem this would be a relatively straight-forward adjustment to the code, perhaps you could show me where metadata.json is defined and I could fork abs. It would have to be redone with every update, but as long as the differences aren't major, there aren't _that_ many updates that it would be prohibitive to do. ``` pwd: /library/books/new/Godwin, William/Enquiry Concerning Political Justice and its Influence on Morals and Happiness (1793) $ ls ⋮ 'Enquiry Concerning Political Justice -- Part 94.opus' 'Enquiry Concerning Political Justice -- Part 95.opus' 'Enquiry Concerning Political Justice -- Part 96.opus' 'Enquiry Concerning Political Justice -- Part 97.opus' 'Enquiry Concerning Political Justice -- Part 98.opus' 'Enquiry Concerning Political Justice -- Part 99.opus' 'Enquiry Concerning Political Justice -- Summary.nfo' 'Enquiry Concerning Political Justice -- Cover 01.jpg' 'Enquiry Concerning Political Justice -- Metadata.json' 'Enquiry Concerning Political Justice -- eBook.epub' ``` vs ``` pwd: /library/books/new/Godwin, William/Enquiry Concerning Political Justice and its Influence on Morals and Happiness (1793) $ ls ⋮ 'Enquiry Concerning Political Justice -- Part 94.opus' 'Enquiry Concerning Political Justice -- Part 95.opus' 'Enquiry Concerning Political Justice -- Part 96.opus' 'Enquiry Concerning Political Justice -- Part 97.opus' 'Enquiry Concerning Political Justice -- Part 98.opus' 'Enquiry Concerning Political Justice -- Part 99.opus' 'Enquiry Concerning Political Justice -- Summary.nfo' 'Enquiry Concerning Political Justice -- eBook.epub' cover.jpg metadata.json ``` ‡ Previously, I'd organized my files without a second layer hierarchy for the authors (or series) so that it was books/Last, First -- Title: Subtitle/Title -- Part ##.opus so that I would be able to see the titles **and subtitles** from the command line. ABS basically removes the ability to see the subtitles for books from the web display and the CLI making finding things much more difficult. I basically have to use find for everything now.
adam added the enhancement label 2026-04-24 23:46:41 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#1465