summaryrefslogtreecommitdiff
path: root/scripts/googlyrics.diff
blob: 4e01f62430fe92b221cf0de92048794a14ede3af (plain)
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
--- /usr/share/apps/amarok/scripts/googlyrics/googlyrics	2008-02-13 23:52:25.000000000 +0100
+++ googlyrics	2008-03-27 13:18:20.000000000 +0100
@@ -264,7 +264,7 @@
 	}
 	my $attempt = 1;
 	while ($attempt != 5) {
-	print "\n<br>Attempt #" . $attempt . "\n";
+#	print "\n<br>Attempt #" . $attempt . "\n";
 	$mech->get("http://www.google.com/intl/en/");
 	if (!$mech->success()) {
 		return "connectfail";
@@ -282,7 +282,7 @@
 	$mech->submit();
 	foreach ($mech->content() =~ m/<div class=g[\s>].*?<a href=\"(.*?)\"/img) {
 		my $url = $_;
-		print "\n<br>" . $url . "\n";
+#		print "\n<br>" . $url . "\n";
 		my $o;
 		my $ly;
 		foreach $ly (@sites) {
@@ -319,16 +319,16 @@
 	my $current = $mech->content();
 	my $regex = $site->{regex};
 	if ($current =~ $regex) {
-		print "\n<br>Regex success for " . $site->{name} . "\n";
+#		print "\n<br>Regex success for " . $site->{name} . "\n";
 		showlyrics($char_converter->convert($1), $site, $loc, $artist, $title);
 		return 1;
 	} else {
-		print "\n<br>Regex failed for " . $site->{name} . "\n";
+#		print "\n<br>Regex failed for " . $site->{name} . "\n";
 		return 0;
 	}
 }
 
-while (1) {
+#while (1) {
 	my $message = <STDIN>;
 	chomp($message);
 	if ($message =~ /^configure/) {
@@ -344,7 +344,7 @@
 			system("dcop", "amarok", "contextbrowser", "showLyrics", ""); #communications errror, "send an empty string"
 		}
 	}
-}
+#}
 
 sub showlyrics {
 	my $out = shift;