Since I had a lot of paperwork to do today I managed to procrastinate by moving my partner's audiobook collection offline (with the added benefit of being able to share the content with chosen family members). This should've been a technical blog post but I am too lazy to have a blog, tried a few times.
Step 1: get your stuff off the audible (which is the content provider for said partner).
In order to do that, we get a program called "Libation": https://github.com/rmcrackan/Libation (huge thanks to @neil for sharing it earlier!).
This program runs on every OS I could find at home (but in my case runs on Debian), its UI is ugly and clunky like something ugly and clunky (the author gives a fair warning about that and I am not the one complaining - I am grateful it works! I am not an UI designer myself, can blame the other person) and does the job exactly as promised. No hiccups, fair amount of various y useful options and it takes a moment to choose the right ones. One can feel it has been done by someone who knows their onions, design aspects aside it is a very nice piece of smoothly working code.
I might help the author later redoing the user interface a bit, once I have some free time, but will not touch anything else. IT WORKS.
Step 2: storage.
Obviously we can store our files on the local computer but that's not the point, innit. I have a QNAP NAS holding a vast collection of our old audiobooks from many different sources, many of them very old digitised tapes first released in Poland many years ago. So I point Libation to merge fresh content with the existing folder structure on NAS. IT WORKS.
Step 3: how to get all that on my partner's phone now?
A tricky one, since on premises that's not a problem but outside our WiFi? Library is too large to simply chuck in on ones phone.
The convergent wisdom of the Internet (that part of it that I tend to lurk in anyway) rightly suggests the AudiobookShelf https://www.audiobookshelf.org/ - at the first glance it IS the thing that I want. But how do I run it on NAS? A bit of a search later I find that it is present on the 3rd party app repository I use anyway: https://www.myqnap.org/
Word of advice: it requires ffmpeg from the same store, as I found out the hard way.
Documentation for this method of installation is next to non-existent, I spent a very frustrating hour trying to figure out what port it runs on, which interface it binds to (my NAS has more than one), etc. And there seem to no obvious way of altering the configuration of the network! Granted, I didn't try to SSH into the NAS and dig there, it's just the UI that doesn't allow. Which is disappointing.
Anyway, in case you follow my steps: interface is the one you defaulted your non-admin WWW traffic to, port is the same as you are pointed to in the browser UI.
To get that out into the world you need to forward said port to the said interface and having a static IP on it helps, of course. Static or unchanching, whatever floats your goat.
If you have non-static IP with your provider, as majority has, QNAP offers you nicely working DDNS service via their cloud ID thing. Your device address would be <your-qnap-device-name>.myqnap.cloud or similar pattern. You can find it in the details of your device on their cloud service. It's free.
What is not free is the SSL certificate. You can pay up for the privilege, or you can use http. Audiobookshelf doesn't care.
One last thing you probably would like to do with AudiobookShelf is to setup unprivleged users for evey person you intent to allow to connect to your server. That's done in browser UI itself, is very straightforward with a few auth options available. I didn't try 3rd party authentication so do your homework, I just did user/password pairs, restricted them from doing changes, enabled explicit content for adults and disabled that for minors. IT WORKS.
Step 4: mobile app.
I detest Android almost as much as I detest "everything needs to be in browser" mindset, so can't tell how AudiobookShelf's beta own app works. Their Apple Store beta is full and can't be accessed too.
So I went with another 3rd party free app, a thing called "Plappa" https://plappa.me/ - the author will receive donation as this thing is exactly what one might need. It connected to my own server over the internet, itself it's simple no-nonsense thing that does one job and does it well. AudiobookShelf also recommends it as one of the 3rd party apps for use with their server as "audiobookshelf enabled". Rightly so. Check their recommendation list, seems to be worth it. More importantly: IT WORKS
And now I am going back at looking at Libation's progress at liberating a few hundred audiobooks. And will consider if I want to chip in with import from Audioteka, which I always did using Python...
#FreeSoftwareAdvent #audiobookshelf #qnap #myqnap #plappa #Libation

