-
Notifications
You must be signed in to change notification settings - Fork 18
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
Improve handling of incorrect paths in validator #119
Comments
This is happening frequently; a timely fix would be very helpful!
A PHP Error was encountered A PHP Error was encountered A PHP Error was encountered A PHP Error was encountered A PHP Error was encountered A PHP Error was encountered A PHP Error was encountered A PHP Error was encountered A PHP Error was encountered A PHP Error was encountered A PHP Error was encountered A PHP Error was encountered |
In the validator, sometimes audio files either have a typo in their path, or aren't actually audio files (when this patch was being tested, the offending files were HTML files from a 301 redirect response). In those cases, mp3gain does not return any useful output. Specifically, instead of printing the header line plus the actually useful line, it just prints the header line, with an error message going to stderr (which we ignore because we only look at stdout). This patch just makes the validator skip any such files. Resolves LibriVox#119 Change-Id: Id08899ef6f415aeece6912e9676a7bcab05caf81
The change from the PR is on the server. @twinkietoes-on does it make sense? I'm basically just skipping any file that mp3gain cannot process for whatever reason. |
In order to help with #119, we try to be smarter about the files we import from the section compiler, and run an id3tag-based sanity check on them. If they fail the check, we delete them from the validator, and return an error message.
Alright, I think the commit above (7f63d1c) should prevent broken files form reaching the validator. Is that the only problem though? What about the filenames with the period at the end? How do they end up happening? |
I was able to reproduce this one last night. A bug in a feature we don't seem to use anymore. This is much less urgent now that the warning messages don't interfere with AJAX requests, but worth fixing when the dust settles on other changes. |
If a path is incorrect in the validator, this is not handled gracefully, and instead we get a whole bunch of errors because the following code in
application/libraries/Librivox_mp3gain.php
that parses themp3gain
output does not have a second line to work with:Here's a screenshot of an incorrect validator path (notice the period at the end of the first file):
And here are the PHP errors we get:
The text was updated successfully, but these errors were encountered: