tfonteyn / NeverTooManyBooks

A book collection app for Android
GNU General Public License v3.0
68 stars 2 forks source link

Audiobooks support #38

Open shuvashish76 opened 4 months ago

shuvashish76 commented 4 months ago

I listen audiobooks from https://librivox.org/ a non-commercial, non-profit and ad-free project (See their About & Wiki page). It's a great project for completely free legal audiobooks. I simply copy the RSS link from a specific book & use it on my AntennaPod app.

Would be nice if we could fetch metadata from there to track our Audiobooks on NTMB app.

tfonteyn commented 4 months ago

I can't make a promise, but I will take a look and see if/how it can be done.

It might take a while before I get around to looking though.

shuvashish76 commented 3 months ago

Do checkout following projects they fetch data for Audible

I do have my Audible offline (DRM removed) collection using Libation. Would be nice if we could support Audible source as well.

tfonteyn commented 3 months ago

I took a look at LibreVox. It's do-able, but searching is not straightforward.

(Apologies upfront: some of the below might not be clear unless you check the source code, in particular "searchengines" and "sync" packages... but these notes are also for myself)

Retrieving data from websites works the best using the ISBN (or similar unique id) of a book. For LibreVox the only unique id I can find is the RSS number.

So there are two search scenarios:

  1. RSS number Bad: the user must lookup the number manually en enter it as the "search-isbn" Good: it's easy and quick to fetch the full RSS data + always a single book! Bad: the RSS data is very limited; it does not contain the original author for example. Good: it does contain a full link back to LibreVox book details.

  2. Accessing LibreVox "Advanced Search" Good: integration is fairly easy (just a FORM element + json/html results Bad: The results contain more info as compared to RSS, but still not enough. The result can be a list with multiple books. Currently NTMB is limited to always fetching the first result only (a long-standing issue I'm afraid) Good: it does contain a full link back to LibreVox book details.

But with either above, we can send a second request and fetch all book details and parse/load them. This is similar to existing SearchEngines (web-sites) anyhow.

Adding support to download the book as an mp3 (similar to how the Calibre integration is done) is also do-able but as an extra step to the above (implement a "Sync") But I think I would decline to do this myself due to the limited value (but pull-requests would of course be welcome).

No promise still, but I will look into this again and run some tests.

Audible: this is an Amazon/commercial site. From past experience with Goodreads, AbeBooks, LibraryThing... Integration is usually possible but those sites tend to change to often... it's always a pain to keep catching up with them. I do it for Amazon itself but really don't like the effort it keeps taking.

shuvashish76 commented 3 months ago

It's ~Libre~LibriVox. Thanks for update 👍🏿