projects
/
HTML5TV.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f3a72a1
)
just directly to subtitle *text*
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Wed, 16 Dec 2009 19:56:56 +0000
(20:56 +0100)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Wed, 16 Dec 2009 19:56:56 +0000
(20:56 +0100)
bin/mplayer.pl
patch
|
blob
|
history
diff --git
a/bin/mplayer.pl
b/bin/mplayer.pl
index
7f476dd
..
74a4c5c
100755
(executable)
--- a/
bin/mplayer.pl
+++ b/
bin/mplayer.pl
@@
-558,13
+558,15
@@
sub edit_subtitles {
print $to_mplayer qq|pause\n|;
focus_term;
my $line = 1;
+ my $jump_to = 1;
open( my $fh, '<', "$subtitles.yaml" ) || die $1;
while(<$fh>) {
last if /^-\s([\d\.]+)/ && $1 > $pos;
+ $jump_to = $line - 1 if /^---/;
$line++;
}
close($fh);
- system( qq|vi +$
line
"$subtitles.yaml"| ) == 0 and load_subtitles;
+ system( qq|vi +$
jump_to
"$subtitles.yaml"| ) == 0 and load_subtitles;
focus_mplayer;
}