diff options
author | Petter Reinholdtsen <pere@hungry.com> | 2010-01-01 08:55:02 +0000 |
---|---|---|
committer | Petter Reinholdtsen <pere@hungry.com> | 2010-01-01 08:55:02 +0000 |
commit | 17732a4e2c0b797ccab5e9a68149487dd7114e58 (patch) | |
tree | a3bbd6cde6cf38185b9691ef4e26c16cc5040c74 | |
parent | f054786ed94754227bcb92a8bdc5f73c87eb6c79 (diff) |
Correct loop handling.
-rwxr-xr-x | frikanalen/bin/scheduler | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/frikanalen/bin/scheduler b/frikanalen/bin/scheduler index c54ca9a..9650495 100755 --- a/frikanalen/bin/scheduler +++ b/frikanalen/bin/scheduler @@ -354,8 +354,10 @@ sub vlc_play { push(@cmds, [$vlc->{url} ."requests/status.xml?command=pl_empty", undef]); push(@cmds, [$vlc->{url} ."requests/status.xml?command=in_play&input=$file", undef]); - push(@cmds, [$vlc->{url} . "requests/status.xml?command=pl_repeat", - sub { my $vlc = shift; $vlc->{loop} = ! $vlc->{loop}; }]); + if ($loop != $vlc->{loop}) { + push(@cmds, [$vlc->{url} . "requests/status.xml?command=pl_repeat", + sub { my $vlc = shift; $vlc->{loop} = ! $vlc->{loop}; }]); + } for my $cmdref (@cmds) { my ($url, $postfunc) = @{$cmdref}; |