Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Files in manifest not matching correctly to the archive #1

Open
flittle8 opened this issue May 22, 2020 · 5 comments
Open

Files in manifest not matching correctly to the archive #1

flittle8 opened this issue May 22, 2020 · 5 comments

Comments

@flittle8
Copy link

@llemeurfr
The files in the manifest are not being matched correctly to the files in the archive because the archive has a root folder. We added a print in the code to show the difference:

  print( filesInManifest )
  print( filesInZip )

This is the output of the print:

{'mindthepaint_1_pinero_64kb.mp3', 'mindthepaint_2_pinero_64kb.mp3', 'mindthepaint_3_pinero_64kb.mp3', 'mindthepaint_4_pinero_64kb.mp3'}
{'Archive/mindthepaint_4_pinero_64kb.mp3', 'Archive/mindthepaint_2_pinero_64kb.mp3', 'Archive/mindthepaint_1_pinero_64kb.mp3', 'Archive/mindthepaint_3_pinero_64kb.mp3', 'Archive/'}
@flittle8 flittle8 changed the title File in manifest not matching correctly to the archive Files in manifest not matching correctly to the archive May 22, 2020
@llemeurfr
Copy link
Contributor

I guess Librivox packages don't always have a stable structure. Can you please give the url of the librivox page you've used?

@flittle8
Copy link
Author

@llemeurfr
Copy link
Contributor

Strange: for the exact same audiobook I obtain
filesInManifest: {'mindthepaint_3_pinero_64kb.mp3', 'mindthepaint_2_pinero_64kb.mp3', 'mindthepaint_1_pinero_64kb.mp3', 'mindthepaint_4_pinero_64kb.mp3'}
filesInZip: {'mindthepaint_1_pinero_64kb.mp3', 'mindthepaint_2_pinero_64kb.mp3', 'mindthepaint_3_pinero_64kb.mp3', 'mindthepaint_4_pinero_64kb.mp3'}

@flittle8
Copy link
Author

flittle8 commented Jun 8, 2020

Thanks. I figured out the issue. It was that I was zipping the folder that contains the audio files, instead of zipping up the audio files themselves. Once this was resolved, another issue came up though.

@flittle8
Copy link
Author

flittle8 commented Jun 8, 2020

The current issue is that Line 208 fails:
jsonschema.validate(pub, schema, resolver=resolver, format_checker=jsonschema.FormatChecker())
It’s failing because pub uses single quotes instead of double quotes which json doesn’t like. If I change this line to use jpub instead of pub, the validation succeeds and the program generates the LPF successfully. However even then when I try to open the LPF in Thorium app, the audio files don’t play. I can send you the LPF that was generated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants