mirror of
https://github.com/mitb-archive/filebot
synced 2025-03-09 13:59:49 -04:00
* better handling of illegal formats
This commit is contained in:
parent
f897837811
commit
978cbe881d
@ -29,11 +29,16 @@ public class SubRipReader extends SubtitleReader {
|
||||
protected SubtitleElement readNext() throws Exception {
|
||||
String number = scanner.nextLine();
|
||||
|
||||
// ignore illegal lines
|
||||
if (!number.matches("\\d+"))
|
||||
return null;
|
||||
|
||||
String[] interval = scanner.nextLine().split("-->", 2);
|
||||
|
||||
// ignore illegal lines
|
||||
if (interval.length < 2)
|
||||
return null;
|
||||
|
||||
long t1 = timeFormat.parse(interval[0].trim()).getTime();
|
||||
long t2 = timeFormat.parse(interval[1].trim()).getTime();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user