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

Support for parsing SRT data as a String instead of a File. #3

Merged
merged 1 commit into from
Apr 4, 2013

Conversation

MaxPower15
Copy link
Contributor

I split parse into parse_string and parse_file. The parse method
chooses which to run based on the input.

This also uncomments the test for a Spanish language file with dubious
encoding. The encoding fallback chain seems like it fixes it.

I split `parse` into `parse_string` and `parse_file`. The `parse` method
chooses which to run based on the input.

This also uncomments the test for a Spanish language file with dubious
encoding. The encoding fallback chain seems like it fixes it.
simonrepp pushed a commit that referenced this pull request Apr 4, 2013
Support for parsing SRT data as a String instead of a File.
@simonrepp simonrepp merged commit 2520735 into cpetersen:master Apr 4, 2013
@simonrepp
Copy link

Hey max,

Thanks a lot, accepting both strings and files for parsing is a nice addition to the package :)
I'm going to run some tests with the spanish subtitle file, i tried to timeshift it previously,
fixing the encoding problems myself in sublime, but no matter which way i tried, afterwards they would not
show in VLC (Windows+Ubuntu) or Movie Player (Ubuntu) despite parsing without errors and looking flawless to me
in a text editor ... Maybe that's fixed now, sure would be great, let's see ;)

@MaxPower15
Copy link
Contributor Author

Hey, thanks for the quick merge!

Yeah, I'm not 100% sure the Spanish stuff is truly fixed. I just noticed that, before my commit, when I uncommented it, it threw a few errors with unknown characters in my terminal (I'm using iterm2 on Mac OSX). After my change, no errors. But correlation is not causation, and I didn't test it on a real video, so I can't be sure.

Side note: Thanks for starting this project. It's definitely saving me some time. :)

@simonrepp
Copy link

Quick followup on the tests i wanted to run: everything fine, your encoding fallback chain is working superbly!
(The problems I described earlier came from an overlooked flaw in my timeshift code :))

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

Successfully merging this pull request may close these issues.

2 participants