Jump to content

EmBook - Proper support for AudioBooks


Inrego

Recommended Posts

I am not having the login issues, but I do have other issues which more or less make the app unusable for me ;/

Stay tuned for updates from me.

  • Like 2
Link to comment
Share on other sites

I am not having the login issues, but I do have other issues which more or less make the app unusable for me ;/

Stay tuned for updates from me.

Have you had the opportunity to look at the problem we have, so that we get a working add-on? I am really eager to try it out.

 

 

/joggs

Link to comment
Share on other sites

Also: Some other exciting news! Luke just finished implementing some crucial changes for audio book support in the core. A whole folder of files can now be considered an audio book, instead of each individual file being treated as a book by itself. This should make things like metadata providers, progress reporting working better. However, this update will probably break EmBook for a little while. I will need to test out how these changes work, and rework EmBook to work with these changes. These are some of the improvements we will possibly get from this:

 

  • Better management of metadata
  • Better support for playback on web client and official Emby app (resume will sync across EmBook and Emby).
  • Simpler codebase for EmBook App.
  • Possibly eliminates the need of server plugin (at least once I've implemented metadata providers into Emby Core).

EDIT: I just installed the version on my server and did some initial testing. The update currently breaks audio books completely. I've written to Luke about it, and he will hopefully be able to fix it rather quickly.

Edited by Inrego
  • Like 1
Link to comment
Share on other sites

unfortunately the same login problem with .7

 

are there any special requirements for logging in? I am loggin in with my username and the pass for emby.media. when i enter the right pass, i get past the login page and comes to an empty servers page. If i enter the wrong pass, i get "an error occurred" in red text under the password field.

Link to comment
Share on other sites

unfortunately the same login problem with .7

 

are there any special requirements for logging in? I am loggin in with my username and the pass for emby.media. when i enter the right pass, i get past the login page and comes to an empty servers page. If i enter the wrong pass, i get "an error occurred" in red text under the password field.

Just to confirm, you do have a library of type "Books" on your server, right?

Link to comment
Share on other sites

Just to confirm, you do have a library of type "Books" on your server, right?

Yes, filled with audiobooks.

I can listen to them the ordinary emby way

Edited by joggs
Link to comment
Share on other sites

Does the server plugin have to work to be able to see something in the app?

I can see the embook plugin on the plugins page, but no settings when trying to open it.

Also, there is no scheduled task conencted to embooks, which I think you have mention in the thread earlier. Not sure if there is supposed to be one.

 

I'm on emby server 3.2.36.14 beta now

Edited by joggs
Link to comment
Share on other sites

Does the server plugin have to work to be able to see something in the app?

I can see the embook plugin on the plugins page, but no settings when trying to open it.

Also, there is no scheduled task conencted to embooks, which I think you have mention in the thread earlier. Not sure if there is supposed to be one.

 

I'm on emby server 3.2.36.14 beta now

No, the plugin handles nothing related to login.

Also, there is no settings page for the plugin.

Lastly, the scheduled task has been removed. Metadata will soon be handled by proper metadata providers.

There's a lot happening server side regarding audio books at the moment, so EmBook will probably not work for a little while now.

  • Like 1
Link to comment
Share on other sites

No, the plugin handles nothing related to login.

Also, there is no settings page for the plugin.

Lastly, the scheduled task has been removed. Metadata will soon be handled by proper metadata providers.

There's a lot happening server side regarding audio books at the moment, so EmBook will probably not work for a little while now.

Ok, thanks.

I'd be happy to help if you need me to test something.

 

 

/joggs

Link to comment
Share on other sites

@@Inrego, I can confirm @@joggs response for .7 - On both wifi and 4g, Login using "app.emby.media" credentials, I see a spinning cicle for about 3 secs then the screen flashes and then a blank Servers screen...

  • Like 1
Link to comment
Share on other sites

Dibbes

@@Inrego You wouldn't by any chance be able to add a way/feature to open normal ebooks and comics on let's say iPad and Android tablets where the apps are installed already, would you? It would be a logical extension ;)

Link to comment
Share on other sites

mediacowboy

Any luck on this? I am only seeing the last third of my books and I noticed there is no schedule task now on the server.

 

Server: 3.2.40.2

Plugin : 1.0.20.4

Link to comment
Share on other sites

Hey there, small update:

 

Integration into core with Luke is still underway.. We have agreed on how Emby should handle audio books, with a small exception. He insists that audio files from several different books in the same folder should be supported (because it's supported in Movies library). The contribution I've made to file name recognition currently does not support this, and will just assume that all audio files in a folder belongs to the same book. I need to correct this before he will properly support it, and thus I need to try to come up with an algorithm that can seperate audio files in a folder into the different books they are a part of.

Link to comment
Share on other sites

mediacowboy

So it sounds like he is thinking like this.

 

Author/

Book 1 - 1. Mp3

Book 1 - 2. Mp3

Book 2 - 1. Mp3

Book 2 - 2. Mp3

...

 

If that is what he is waiting he doesn't make sense. I would rather have the current way of:

 

Book name/

Book - 1.mp3

 

Or

 

Author /

Book name/

Book - 1.mp3

Book name/

Book - 1.mp3

 

 

Also depending how you do it can you implement a collection feature? Thought behind that is to group all books of a serious into one group. I currently update the sort name and do series name - number.

Edited by mediacowboy
Link to comment
Share on other sites

@@mediacowboy yeah that's pretty much what he wants. More specifically, this is the test he used that gave him a result he didn't like.

 

5a1c397bdcdd6_5a11eae269c07_Untitled.png

They were all resolved as a single audio book. And while I understand why he thinks that's strange, I tried to explain that it's not really a representation of a real-world case, and that we would always expect books to be grouped by a folder. But he does seem to insist that it resolves into multiple books.

I am thinking about how the algorithm should work, and the most obvious book seperator is file extension. But I don't think that will be enough, so I will need to think of a better algorithm.

Link to comment
Share on other sites

It is almost impossible to separate many file patterns if they are in the same directory and this creates other problems. The interesting part is to find the file number in the filename.

 

I've coded these kinds of mp3 scanning apps in the past and it usually ends with that the user have to create pseudo regexp's to be able to match different patterns that matches the users books, and these adjustments causes other patterns to crash as you never know if a title, author or other strings are on the first, second or third position in the file name. They are just strings. Also, the audiobook releases doesn't follow the standard recommended patterns that usually audio mp3's do.

 

The way to do it is to require one book in one folder.

 

After that you have to agree with Luke a list of regexp's for common file patterns that should be supported. Then create a method that iterates the files and add each regexp match to a separate list or array.

 

a start: 

 https://stackoverflow.com/questions/1601241/c-sharp-regex-matching-file-names-according-to-a-specific-naming-pattern

https://stackoverflow.com/questions/1363183/problem-creating-regex-to-match-filename

Edited by joggs
  • Like 1
Link to comment
Share on other sites

Then you have to agree with Luke a list of regexp's for common file formats that should be supported. Then create a method that iterates the files and add each regexp match to a separate list or array.

 

Right now, I use the following regexes:

 

// Detect specified chapters, like CH 01
ch(?:apter)?[\s_-]?(?<chapter>\d+)
// Detect specified parts, like Part 02
p(?:ar)?t[\s_-]?(?<part>\d+)
// Chapter is often beginning of filename
^(?<chapter>\d+)
// Part is often ending of filename
(?<part>\d+)$
// Sometimes named as 0001_005 (chapter_part)
(?<chapter>\d+)_(?<part>\d+)
// Some audiobooks are ripped from cd's, and will be named by disk number.
dis(?:c|k)[\s_-]?(?<chapter>\d+)
 

 

 

I also need to extract the chapter/part numbers in order to sort the files in correct order (as some books are not in alphanumerical order).

Basically, I just look for specified chapters or parts, numbers in beginning or end of filename, and disks numbers. This works for the functionality I've implemented now.

 

But for mixing up books in a folder, I think there will always be false positives.

 

Here are some examples of naming for audio book files:

  • 02 Four Years Before the Fall
  • 03 The Army of 2
  • 0001-01
  • 0001-02
  • 2 A Clash of Kings 08
  • 2 A Clash of Kings 07

The file "03 Chapter Two - The Army of 2" would be recognized as the same book as A Clash of Kings.

Edited by Inrego
  • Like 1
Link to comment
Share on other sites

Right now, I use the following regexes:

 

 

I also need to extract the chapter/part numbers in order to sort the files in correct order (as some books are not in alphanumerical order).

Basically, I just look for specified chapters or parts, numbers in beginning or end of filename, and disks numbers. This works for the functionality I've implemented now.

 

But for mixing up books in a folder, I think there will always be false positives.

 

Here are some examples of naming for audio book files:

  • 02 Four Years Before the Fall
  • 03 The Army of 2
  • 0001-01
  • 0001-02
  • 2 A Clash of Kings 08
  • 2 A Clash of Kings 07

The file "03 Chapter Two - The Army of 2" would be recognized as the same book as A Clash of Kings.

 

Agree! I've added alot of text to my previous post. Please have a look.

Link to comment
Share on other sites

Agree! I've added alot of text to my previous post. Please have a look.

I re-read your post. And for book-per-folder approach, I have a working solution.

 

I've told @@Luke that my approach so far has been to require a folder per book because of these name parsing problems (and because that's how you'd always have it in your library, anyway).

But his latest message was just that he has implemented support for book-per-folder for folders with just a single audio file. And will support multi-file books once my resolver is updated to match video file naming in this regard.

Link to comment
Share on other sites

I re-read your post. And for book-per-folder approach, I have a working solution.

 

I've told @@Luke that my approach so far has been to require a folder per book because of these name parsing problems (and because that's how you'd always have it in your library, anyway).

But his latest message was just that he has implemented support for book-per-folder for folders with just a single audio file. And will support multi-file books once my resolver is updated to match video file naming in this regard.

 

As you never will be able to differ  "01 - author - title" , from "01 - title - author" , you will have to solve it by extract all numbers from the filename and see if it differs between the files(as your example "2 A Clash of Kings 08" could be track 8 or 2 depending on the rest of the files. If it doesn't differ, it is a part of the title. If it differs, then it is the track number. and so on.

 

 

The titles will then have different formats, but I guess you should be able to manually edit the book name 

Edited by joggs
Link to comment
Share on other sites

As you never will be able to differ "01 - author - title" , from "01 - title - author" , you will have to solve it by extract all numbers from the filename and see if it differs between the files(as your example "2 A Clash of Kings 08" could be track 8 or 2 depending on the rest of the files. If it doesn't differ, it is a part of the title. If it differs, then it is the track number. and so on.

 

 

The titles will then have different formats, but I guess you should be able to manually edit the book name

But in many cases, the text is not title, but rather name of the chapter.

 

Sent from my ONEPLUS A5010 using Tapatalk

Link to comment
Share on other sites

But in many cases, the text is not title, but rather name of the chapter.

 

Sent from my ONEPLUS A5010 using Tapatalk

True.

Hmm...

Edited by joggs
Link to comment
Share on other sites

I have thought of an approach that should be fairly easy to implement, and catch most cases without false positives (by a false positive, I mean that a book is split into 2 or more). I don't care too much about cases where too many files are possibly included in a book - because as you know, that will really never happen in real-world scenarios. So the worst thing that can happen, is that a book that is only 1 book in a folder gets split up into 2 books.

Edited by Inrego
Link to comment
Share on other sites

mediacowboy

I have thought of an approach that should be fairly easy to implement, and catch most cases without false positives (by a false positive, I mean that a book is split into 2 or more). I don't care too much about cases where too many files are possibly included in a book - because as you know, that will really never happen in real-world scenarios. So the worst thing that can happen, is that a book that is only 1 book in a folder gets split up into 2 books.

What do you mean can you provide a sample or idea on what you mean?
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...