From bae3510b599c2eb13cf0e8a3c16239136212d005 Mon Sep 17 00:00:00 2001 From: Alex 'AdUser' Z Date: Thu, 7 Jul 2016 16:18:44 +1000 Subject: [PATCH] * Subtitle::SSA : fixes --- lib/Subtitle/SSA.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/Subtitle/SSA.pm b/lib/Subtitle/SSA.pm index 20428de..0f52da6 100644 --- a/lib/Subtitle/SSA.pm +++ b/lib/Subtitle/SSA.pm @@ -54,7 +54,7 @@ sub parse { $section = 'styles'; unless ($self->{type}) { $self->{type} = ($1) ? 'ass' : 'ssa'; - $self->log(warn => "Set type to $self->{type} because of $linenum (fallback mode)"); + $self->log(warn => "Set type to $self->{type} because of line $linenum (fallback mode)"); } } else { undef $section; @@ -83,12 +83,12 @@ sub parse { push @{ $self->{h_order} }, $key; } $self->{headers}->{$key} = $header; - next; if ($key eq 'scripttype') { - my $type = index($header->{type}, "+") >= 0 ? 'ass' : 'ssa'; - $self->log(info => "File recognized as '$type' type from header at $linenum"); + my $type = index($header->{value}, "+") >= 0 ? 'ass' : 'ssa'; + $self->log(info => "File recognized as '$type' type from header at line $linenum"); $self->{type} = $type; } + next; } if ($section eq 'styles') { if ($line =~ m/^\s*Format:/oi) { @@ -118,7 +118,7 @@ sub parse { } next; } - $self->log(warn => "unrecognized line at $linenum: $line"); + $self->log(warn => "unrecognized line at line $linenum: $line"); } return scalar @{ $self->{events} };