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
Do files have ID3 Tags? What are the current file paths? Please read How to Request Help.
If yes, then you can use Music Mode.
If no, maybe you can use Plain File Mode to rewrite file paths based on information in the file path and nearby files.
The target file path is entirely up to your custom format expression.
If yes, then you can use Music Mode.
If no, maybe you can use Plain File Mode to rewrite file paths based on information in the file path and nearby files.
The target file path is entirely up to your custom format expression.
Please read the FAQ and How to Request Help.
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
Please share your format expression for the benefit of all readers including your future self.
No, but you can use Edit Name (i.e. F2 keyboard shortcut) to edit a New Names item before renaming.
Yes, your format can yield different results for different files. But baking special logic for one individual file into your custom format is probably not very smart. Might make sense if there's a pattern though.
Please read the FAQ and How to Request Help.
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
---------------------------------------
If there is not a series of books I would lay it out like
/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+/) }
Match information from the file path
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.
Conditional Structures (if-then-else)
Please read the FAQ and How to Request Help.
Re: Audiobookshelf - Folder/File Format
What is the command you are using and what does the console output say?
If you use --action hardlink then it'll either create a hardlink or fail. There is no other possibility.
If you use --action hardlink then it'll either create a hardlink or fail. There is no other possibility.
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.
Please read the FAQ and How to Request Help.
Re: Audiobookshelf - Folder/File Format
Can you provide more context? Linux? Desktop? Docker? Local files? Remote network share?
If FileBot confirms the hardlink operation, then it worked, as far as FileBot knows. Keep in mind that FileBot merely asks the OS to "hardlink A to B" and then the OS / file system driver does the work. If remote file system are involved, the local OS may not necessarily know what the remote OS does. You'll want to run your ls -li checks on the local file system on the OS that hosts the files locally. If you do ls -li on a remote SMB share, then that might hide native file system details.
You can run a test like this to do some trial & error testing for yourself:
** after hardlinking the file, we have the inode twice, and the link count goes from 1 to 2
If FileBot confirms the hardlink operation, then it worked, as far as FileBot knows. Keep in mind that FileBot merely asks the OS to "hardlink A to B" and then the OS / file system driver does the work. If remote file system are involved, the local OS may not necessarily know what the remote OS does. You'll want to run your ls -li checks on the local file system on the OS that hosts the files locally. If you do ls -li on a remote SMB share, then that might hide native file system details.
You can run a test like this to do some trial & error testing for yourself:
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
Please read the FAQ and How to Request Help.
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.
Please read the FAQ and How to Request Help.