6 This file contains some DVB related functions.
7 Draft: "ETSI EN 300 468"
17 use NonameTV
::Log qw
/progress/;
21 our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
23 # set the version for version checking
28 %EXPORT_TAGS = ( ); # eg: TAG => [ qw!name1 name2! ],
29 @EXPORT_OK = qw
/DVBCategory/;
35 my( $ds, $categ, $type ) = @_;
37 my $defaultcategory = "0:0:0:0";
38 return $defaultcategory if ( $categ !~ /\S+/i );
40 my $q = "SELECT * from dvb_cat WHERE `category` LIKE '%" . $categ . "%' LIMIT 1";
41 my( $res, $data ) = $ds->sa->Sql( $q );
43 return $defaultcategory if( ! $res );
45 while( my $category = $data->fetchrow_hashref() ) {
46 return $category->{dvb_category
};
49 return $defaultcategory;
54 ### Setup coding system