helixarch / subedit

Command-line subtitle editor written in BASH
GNU General Public License v2.0
92 stars 10 forks source link

*.bak is not accessable & not valid srt #13

Closed testbughub closed 3 years ago

testbughub commented 3 years ago

Hi!

First of all, thank you for this. It has helped me multiple times, and I can't live without it now.

Now for my issue.

This first srt file works fine: https://pastebin.com/W5hBj7js

But this doesn't for some reason: https://pastebin.com/DFyDyb2Q

Am I missing something?

helixarch commented 3 years ago

bak stands for backup, if you want to use it, just rename it and remove the .bak extension

testbughub commented 3 years ago

I know, it's the error I get when I try to shift the time. https://imgur.com/a/J4YFjs6

helixarch commented 3 years ago

It seems that the file's permissions have been changed for some reason, making it is not readable. Try changing permissions first with chmod +r name_of_the_file

testbughub commented 3 years ago

Nope, that's not either. I'm a intermediate/advanced Linux user, so I know how permissions work. I can fix issues like these most of the time, but because of how large this file is, I'm having trouble finding the cause. It's very odd, because this is the first time I've gotten this error, and I've used it probably 100+ times. https://imgur.com/a/XatMorR

EDIT: You can try it yourself if you'd like: https://0x0.st/iDdl.srt

ody1 commented 3 years ago

@testbughub Thank you for your kind words.

The problematic srt has a single space at the end of every time string. The regular expression that is used to parse the srt files was vary strict, so the file was not detected to be a valid srt subtitle.

Fixed it in the last commit 8f44af9.

testbughub commented 3 years ago

Ah, so that's what it was! Never noticed it before. So glad you figured it out. Thanks again!