File: fix_time_limit_handling.patch

package info (click to toggle)
icecream 1.3-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 192 kB
  • sloc: perl: 2,895; makefile: 20
file content (29 lines) | stat: -rw-r--r-- 723 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Author: Cristian Greco <cristian@regolo.cc>
Description: fix time limit options handling.

--- a/icecream
+++ b/icecream
@@ -1197,6 +1197,11 @@
 {
 	my ($url) = shift || return undef;
 	my ($config) = shift || return undef;
+
+	$config->{'stop'} = 0;
+	$config->{'played-tracks'} = 0;
+	$config->{'bytes-downloaded'} = 0;
+	$config->{'start-time'} = time();
 	
 	# play direct stream url (not .pls nor .m3u)
 	if (($url =~ /^http/) and (not (($url =~ /\.m3u$/) or ($url =~ /\.pls$/))))
@@ -1225,11 +1230,6 @@
 
 	debug("play list parsed");
 
-	$config->{'stop'} = 0;
-	$config->{'played-tracks'} = 0;
-	$config->{'bytes-downloaded'} = 0;
-	$config->{'start-time'} = time();
-
 	my $entry = ();
 	foreach $entry (@pls) 
 	{