PaulWoitaschek / Voice

Minimalistic audiobook player
GNU General Public License v3.0
2.43k stars 370 forks source link

Chapters showing in random order and incorrectly #879

Closed huyansm closed 4 years ago

huyansm commented 5 years ago

Please include the following details in your bug report:

App-Version: 4.3.2 Phone Name: Xiami Mi A2 Android Version: 9

I'm making a guess here, but I think the problem is when CHAP frames of ID3 Tags are not in order (for example first CHP1 then CHP10 then CHP2, CHP3, etc) but I wouldn't know because Voice is also showing chapters from other audiobooks!

Here is an example of a file that makes that occur: https://we.tl/t-sBmQEzkrmO

weiluntong commented 5 years ago

The link you posted has expired, I can't see the example. However, judging from your description in the parenthesis, it makes sense. As people we see in "natural sort" order, but a computer does not, and it sorts by the characters it sees first, since CHP1 and CHP10 share "CHP1", of course they're gonna be sorted together. Natural sort needs to be explicitly programmed in, I think this could be done though, can we add the PR-Welcome label to this?

Also, can I get that example file back up again please @huyansm? I want to try my hand at trying to fix this if possible. Also also, you mentioned that chapters is showing other audiobooks, I would like to see the directory structure of how you store your audiobooks too, because I think I have an idea of why that's happening too.

Otherwise there's not much I can do as I won't be able to reproduce your problem.

huyansm commented 5 years ago

Sure! Here's another example

https://filebin.net/ybmoqhgif02vy7h7/Tao_Te_Ching-Part01.mp3?t=hlafbhog

I tried to fix it debugging the app but couldn't get to the bottom of the issue. It might be something else than just the order because not all chapters are being shown.

Thanks for looking into this!

PD: About the app showing chapters from other audiobooks, that's not happening anymore.

weiluntong commented 5 years ago

Hm... maybe I'm missing something here, but how are you getting the app to display chapters for that file?

huyansm commented 5 years ago

https://ibb.co/qsj5jQ3 And in otheredia players like VLC it shows correctly

weiluntong commented 5 years ago

Yeah, all I can get from the mp3 file you gave me is the file itself. https://ibb.co/N7pGPH0 https://ibb.co/CzHkp6c https://ibb.co/DrYfpr6

huyansm commented 5 years ago

Filebin might have converted the file and deleted the chapters tags, I uploaded a zipped file now

https://filebin.net/cvbdzwwu7ws5czu6/Tao_Te_Ching-Part05.zip?t=aw5exfbe

weiluntong commented 5 years ago

I still can't even get to a point where I can try to reproduce your issue... the mp3 file you've zipped up is still only being show as a single part for my apps. How are you getting these mp3 files? Are they the ones you're opening in the app, or is the app the one giving you the mp3s?

huyansm commented 5 years ago

I don't really know why it doesn't show up with you, I tried with another app (Simple Audiobook Player) and chapters are shown okay. This player is missing too many functions tough. These are the same mp3 files I'm using to play on the app.

weiluntong commented 5 years ago

hmm... that is strange. Are there other files that aren't mp3 in the same directory you house your mp3s? Though, I guess I doubt there's some meta file because I think these are the only files the app looks for:

  private val imageTypes = Arrays.asList("jpg", "jpeg", "png", "bmp")
  private val audioTypes = arrayOf(
    "3gp",
    "aac",
    "awb",
    "flac",
    "imy",
    "m4a",
    "m4b",
    "mid",
    "mka",
    "mkv",
    "mp3",
    "mp3package",
    "mp4",
    "opus",
    "mxmf",
    "oga",
    "ogg",
    "ota",
    "rtttl",
    "rtx",
    "wav",
    "webm",
    "wma",
    "xmf"
  )

I'm just shooting random thoughts out right now because there's functionality you're experiencing that I am not... and it's kinda hard to move forward haha...

monreal commented 5 years ago

I think I experience something similar. I converted an audiobook I bought to AAC, MP3 and Opus. I can import all three versions into Voice but only the Opus one actually shows the correct number of chapters (26 files => 26 chapters). The other two also consist of 26 files each but show 53 chapters each. Playing those does not result in a correct playing order of course.

hugoromo commented 4 years ago

Did anyone managed to fix this? I am having the same issue

PaulWoitaschek commented 4 years ago

@huyansm can you upload the file again? The links expired.

huyansm commented 4 years ago

Sure, no problem. Here it is: https://ufile.io/m07eyhcz

PaulWoitaschek commented 4 years ago

Thanks. In the latest release candidate it displays fine: Screenshot_20200325-202134

huyansm commented 4 years ago

Is that release available already in the playstore?

PaulWoitaschek commented 4 years ago

For a small percentage of the users, yes. However there are still unresolved issues like the widget not working properly when the app is closed and possible book duplicates. You can grab the apk from the github releases page.