Return genres.
[utils.git] / ANN.pm
diff --git a/ANN.pm b/ANN.pm
index dfa4b41..aefd04e 100644 (file)
--- a/ANN.pm
+++ b/ANN.pm
@@ -122,7 +122,7 @@ sub getthemes
 
 sub getseries
 {
-    my($id, $buf, $html, %ret);
+    my($id, $buf, $html, %ret, @cp);
     ($id) = @_;
     
     if(!($html = _get geturl $id)) {
@@ -142,6 +142,10 @@ sub getseries
     if(($buf) = ($html =~ /number of episodes:<\/b>\n([^<]+)</is)) {
        $ret{"eps"} = $buf;
     }
+    if(($buf) = ($html =~ /genres:<\/b>\n([^<]+)</is)) {
+       @cp = split /,\s*/, $buf;
+       $ret{"gnr"} = \@cp;
+    }
     $buf = getthemes $html, "opening";
     $ret{"op"} = $buf if(@{$buf});
     $buf = getthemes $html, "ending";