rasmuslos / ShelfPlayer

Native Audiobookshelf player for iOS & iPadOS
Other
188 stars 18 forks source link

E-Book support #35

Open gh0sti opened 8 months ago

gh0sti commented 8 months ago

image

Was looking at my comic/ebook library and noticed that it has play clock time and probably needs to be logically looked at how to present and manage ebooks and comics. Are you looking to do something like komga to stream pages to the client?

gh0sti commented 8 months ago

I would maybe make this a feature dev flag to disable for the time being if ebooks and comics aren't going to be supported for the time being.

rasmuslos commented 8 months ago

I would wait until ebooks / comics are fully supported in ABS until I consider implementing them. But I am not sure if they will ever be supported, because I would consider them out of scope for an app primarily aimed at playing audio

gh0sti commented 8 months ago

I would wait until ebooks / comics are fully supported in ABS until I consider implementing them. But I am not sure if they will ever be supported, because I would consider them out of scope for an app primarily aimed at playing audio

They actually are supported on ABS

"Basic ebook support and ereader Epub, pdf, cbr, cbz Send ebook to device (i.e. Kindle)"

https://github.com/advplyr/audiobookshelf?tab=readme-ov-file#about

rasmuslos commented 7 months ago

Well as far as I can tell there is an API endpoint to get the pub / pdf / ... file, but not much more. This is very likely to change and become a more fully fledged solution.

I will reopen this to have something to go back to, but not until the ebook support is more than just basic

lkjfdsaofmc commented 6 months ago

If possible when EBook support is looked at again, it would be nice to have a feature to simply download the ebook file (such as epub) directly in the app in a way that allows you to then share it out the same as if you access ABS via a web browser on your phone. This feature allows you to share it to something such as a kindle e-reader which would be a more convenient method for loading my ebooks to an e-reader than through my computer or phones web browser.

rasmuslos commented 6 months ago

If possible when EBook support is looked at again, it would be nice to have a feature to simply download the ebook file (such as epub) directly in the app in a way that allows you to then share it out the same as if you access ABS via a web browser on your phone. This feature allows you to share it to something such as a kindle e-reader which would be a more convenient method for loading my ebooks to an e-reader than through my computer or phones web browser.

This would actually be a good (temporary) solution. I have looked at some other apps like Smart Comic Reader and looked for some libraries to handle the actual comic rendering and it seems like it would have to reinvent the wheel for this to work natively in ShelfPlayer. But I am pretty sure there is no way to sync progress back to ShelfPlayer...

gh0sti commented 6 months ago

If possible when EBook support is looked at again, it would be nice to have a feature to simply download the ebook file (such as epub) directly in the app in a way that allows you to then share it out the same as if you access ABS via a web browser on your phone. This feature allows you to share it to something such as a kindle e-reader which would be a more convenient method for loading my ebooks to an e-reader than through my computer or phones web browser.

This would actually be a good (temporary) solution. I have looked at some other apps like Smart Comic Reader and looked for some libraries to handle the actual comic rendering and it seems like it would have to reinvent the wheel for this to work natively in ShelfPlayer. But I am pretty sure there is no way to sync progress back to ShelfPlayer...

Looking at the current commits in ABS server and app they added comic book support.

https://github.com/advplyr/audiobookshelf-app/commit/9b670377741fb1ad39d47b49d948330517489ec6 https://github.com/advplyr/audiobookshelf-app/commit/9b670377741fb1ad39d47b49d948330517489ec6

rasmuslos commented 6 months ago

Can a e-book exist without an audiobook?

rasmuslos commented 6 months ago

Also putting this here for future reference: https://developer.apple.com/documentation/uikit/uidocumentinteractioncontroller

lkjfdsaofmc commented 6 months ago

An e-book can exist in ABS without an audiobook, but ABS doesn't read much of the metadata from the epub files beyond title. My work-around thus far has been to create a 1 second blank audio file to hold the metadata for the e-book and keep that with the epub so ABS thinks there's an audiobook, but if you used online matching/metadata sources (which I have turned off completely) it would probably be fine having epub's alone.

rasmuslos commented 5 months ago

To give you some context why this takes so long: to use the document interaction controller and present a menu you have to specify the bounds and a view, but both are UIKit components. The app is written in SwiftUI, so I have to create an UIViewRepresentable, but I don't really know how this works and how to get the bounds.

danielraffel commented 5 months ago

It looks like epub support is enabled in the official client apps. Are there plans to add support soon?

https://github.com/advplyr/audiobookshelf-app

For now, I've disabled indexing non-audio files since they don't render nicely in this client (I get a play icon which shouldn't appear.) Thanks for making a nice, clean app!

rasmuslos commented 5 months ago

For now ebooks will be filtered, so they don't show up in your library. I check the numAudioFiles property for this, not ideal, but it should work until I find a better way to do this. The problem is that audiobooks and ebooks are virtually the same thing in ABS, but in ShelfPlayer they will most likely be their own thing.

rasmuslos commented 3 weeks ago

This API should allow ShelfPlayer to export documents