Audiobookshelf - Folder/File Format
Audiobookshelf - Folder/File Format
I really hope FileBot is the fix to my problem. I have a bunch of audiobook files that I need to hardlink and create a folder system for Audiobookshelf to read them correctly.
Right now my original files are either single m4b/mp3 files or they are folders with m4b/mp3, jpg, nfo and cue files.
The way I would like to organize these is -
-Shirtaloon (Author(folder))
--He Who Fights With Monsters (Series(folder))
---2021 - Book 1 - He Who Fights with Monsters (Title(folder)Is
----Hardlinked Files
I have found that the name of the hardlinked files does not matter as much as the folder system.
is this something FileBot can do for me?
Right now my original files are either single m4b/mp3 files or they are folders with m4b/mp3, jpg, nfo and cue files.
The way I would like to organize these is -
-Shirtaloon (Author(folder))
--He Who Fights With Monsters (Series(folder))
---2021 - Book 1 - He Who Fights with Monsters (Title(folder)Is
----Hardlinked Files
I have found that the name of the hardlinked files does not matter as much as the folder system.
is this something FileBot can do for me?
Re: Audiobookshelf - Folder/File Format




Re: Audiobookshelf - Folder/File Format
Yes all the files have ID3 tags but not all of them are perfectly accurate.
I have figured out a file path and format expression that gets me close but because of some of the inaccurate ID3 tags like {artist} will create different artist folder for the same artist. While in the hardlink setting when I click on the destination file and try and change just that single format it changes all the formats to that expression.
Is there a way to change the expression just for one file while working with multiple files?
I have figured out a file path and format expression that gets me close but because of some of the inaccurate ID3 tags like {artist} will create different artist folder for the same artist. While in the hardlink setting when I click on the destination file and try and change just that single format it changes all the formats to that expression.
Is there a way to change the expression just for one file while working with multiple files?
Re: Audiobookshelf - Folder/File Format



Re: Audiobookshelf - Folder/File Format
I am using Audiobookshelf and following their Directory Structure
Using ID3 tags in music mode
/storage/data/media/audiobooks/{artist}/{album}/{y} - {t} - Book#/{y} - {artist} - {t}
( ^ change this path as desired ^ ) -------------------(Change book #^)---(^file name^)
There will be a lot of manual "edit file" but I think it will be worth it in the end
Thanks for your help!
Re: Audiobookshelf - Folder/File Format
Another question...
After I hardlink these, Audiobookshelf lets me change tagging to help with identifying the book. If I change any of this in the hardlinked file will this sever the link?
After I hardlink these, Audiobookshelf lets me change tagging to help with identifying the book. If I change any of this in the hardlinked file will this sever the link?
Re: Audiobookshelf - Folder/File Format
I want to edit my post above, After messing around with naming some more I found a better way that is more mobile frendliy as that is what the majority of my listeners use.
Format Expression -
/storage/data/media/audiobooks/{artist}/{album}/Book # - {t}({y})/Book # - {t}
Format Description -
/Desired/File/Path/Here/Author/Series/Book # - Title(year)/Book # - Title
Example
Original File -
Defiance of the Fall 4_A LitRPG Adventure
New Names -
/storage/data/media/audiobooks/TheFirstDefier, JF Brink/Defiance of the Fall 4: A LitRPG Adventure (Unabridged)/Book # - Defiance of the Fall 4: A LitRPG Adventure (Unabridged)(2022)/Book # - Defiance of the Fall 4: A LitRPG Adventure (Unabridged)
Edit Name - This is were I make sure the Author and Series match to the rest of the books, everything else is preference.
/storage/data/media/audiobooks/TheFirstDefier, JF Brink/Defiance of the Fall/Book 4 - Defiance of the Fall(2022)/Book 4 - Defiance of the Fall
---------------------------------------
If there is not a series of books I would lay it out like
/Desired/File/Path/Here/Author/Title(year)/Title
Format Expression -
/storage/data/media/audiobooks/{artist}/{album}/Book # - {t}({y})/Book # - {t}
Format Description -
/Desired/File/Path/Here/Author/Series/Book # - Title(year)/Book # - Title
Example



Original File -
Defiance of the Fall 4_A LitRPG Adventure
New Names -
/storage/data/media/audiobooks/TheFirstDefier, JF Brink/Defiance of the Fall 4: A LitRPG Adventure (Unabridged)/Book # - Defiance of the Fall 4: A LitRPG Adventure (Unabridged)(2022)/Book # - Defiance of the Fall 4: A LitRPG Adventure (Unabridged)
Edit Name - This is were I make sure the Author and Series match to the rest of the books, everything else is preference.
/storage/data/media/audiobooks/TheFirstDefier, JF Brink/Defiance of the Fall/Book 4 - Defiance of the Fall(2022)/Book 4 - Defiance of the Fall
---------------------------------------

/Desired/File/Path/Here/Author/Title(year)/Title
Re: Audiobookshelf - Folder/File Format
1.
Looks like you might want to match the Book # from the file name if you can't get it from the ID3 Tags.
e.g. match the first number from the current file name:
** you may need to adjust the regex pattern to your needs since the "first number in the file name" may not necessarily always be the Book # depending on your files
Match information from the file path
2.
Conditional Structures (if-then-else)
Looks like you might want to match the Book # from the file name if you can't get it from the ID3 Tags.
e.g. match the first number from the current file name:
Format: Select all
{ fn.match(/\d+/) }

2.
Possible. But how do you know if a book is part of a series of books? Based on ID3 Tags? Based on file name patterns? Based on other files in the same folder? Anything is possible, if you can express the condition in code.

Re: Audiobookshelf - Folder/File Format


Every file is a hardlink, because every file is just a "link" to the physical data on disk. You can have multiple "links" that refer to the same physical data on disk, i.e. you can have the same file at multiple file paths, which means modifying one file is the same as modifying the other file, since both files are "links" to the same physical data on disk.
Re: Audiobookshelf - Folder/File Format



Console Output: Select all
$ ls -li
50173353 -rw-r-----@ 1 ... Alias.1x01.mp4
$ filebot -rename Alias.1x01.mp4 --action hardlink --log INFO
[HARDLINK] from [Alias.1x01.mp4] to [Alias - 1x01 - Truth Be Told.mp4]
$ ls -li
50173353 -rw-r-----@ 2 ... Alias - 1x01 - Truth Be Told.mp4
50173353 -rw-r-----@ 2 ... Alias.1x01.mp4
Re: Audiobookshelf - Folder/File Format
This is on Unraid in docker, All local on the server.
here is the ls -li from yesterday and it looks like the permissions on the folder changed the permissions on the file.

Just did this one and kept it in the same folder and the permissions stayed the same and the inode numbers stayed the same.

could the permissions be what is messing it up?
here is the ls -li from yesterday and it looks like the permissions on the folder changed the permissions on the file.

Just did this one and kept it in the same folder and the permissions stayed the same and the inode numbers stayed the same.

could the permissions be what is messing it up?
Re: Audiobookshelf - Folder/File Format
This screenshot shows 1 directory (see d in permissions) and 1 file, and confirms that the file is one of 2 (see 2 after permissions) hardlinks. The screenshot notably does not show the other hardlink. You seem to be comparing the inode number of a subdirectory with the inode number of a file? Those would be different of course.