-
Notifications
You must be signed in to change notification settings - Fork 39
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
SRT converting issue #29
Comments
Could you please post fragment of that incorrectly produced SRT file? |
Sure.
After my Python script:
|
OK, so it seems that every single line is separated by additional empty line. QNapi uses CLRF ("\r\n") as line separator, which should be correctly recognized by most of systems/software, so I think that this is not necessarily a problem. It's hard verify now, but I suspect that reader of the input format has some defect and produce content with additional newline tokens. Could you provide link to original, untouched (without conversion enabled) subtitles downloaded by QNapi, which the problem concerns? |
LOL I think I've found the issue - the subtitles I was converting were already in SRT format. So it more like SRT (original) -> (qnapi's conversion) -> messed up SRT. Tried on different Series now, and it downloaded .txt subtitles, which were in SRT format. It converted it wrong too. TXT: https://gist.github.com/pagenoare/84ca931d5a84998680f3 IMO, You're missing some detection IF downloaded subtitles are in the format requested by converter. If they are, just change the extension and should be fine, hm? Thanks!! |
Well, I couldn't reproduce conversion resulting with messed up file that you have provided. It's nothing wrong that QNapi reads SRT file and produce resulting file in SRT format too. Sometimes that is desired behaviour - that kind of "conversion" performed by QNapi can fix incorrect SRT in some cases. The problem is that I converted subtitles from gitsts that you provided, resulting with no problematic empty lines. Similarly, I downloaded other subtitles in SRT format for certain movies, having enabled target format conversion to SRT - again without empty lines. So far I checked that on Linux only. Basing on current knowledge, it can be:
Another question: what text viewer you use to preview resulting srt files (where you see the empty lines)? Does it change when you use other text viewer? |
I'm using Windows 8.1, I can check later on Linux or OSX if you like. I'm using Sublime, Vim, Atom to see the file, on all of them - this issue is visible. (it can be fixed via Python, so it's not really editor issue, but the chars). @edit Thanks, |
I checked that both on Windows 7 and Windows 10 with your config applied - none of them inserted additional empty lines to resulting files.
Yes, if you can - it could confirm or eliminate dependency on OS. |
Will do later today / tomorrow morning! sob., 24 paź 2015, 19:23 Piotr Krzemiński użytkownik <
|
Heya,
Recently, because of the player I'm using (which doesnt support TXT subtitles), I've enabled converter option.
Overall it works OK, BUT there's too many new line characters added, which is causing issues in my player. I've created a simple python script, which takes care of those characters.
After running those couple of lines, the subtitles are working fine with my player.
Any chance that this can be fixed in the core?
Thanks for this software!
Regards,
Kacper.
The text was updated successfully, but these errors were encountered: