Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions genremapper/genremapper.pl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
## takealug.de ##
##########################################

#Output Datei für Fehlermeldungen
my $genre_error = "genre_error.txt";

## Hier werden Die EIT NORM Genre Aufgeführt und definiert##
my $MOVIE = "Movie / Drama";
my $THRILLER = "Detective / Thriller";
Expand Down Expand Up @@ -596,13 +599,15 @@

my $PRE = '<category lang=\"de\">' ;
my $POST = '</category>' ;
open (FILE, ">>$genre_error") || "Error opening File $\n";

sub myfilter {
my ($a) = @_;
if ( exists $REPLACE{$a} ) {
return $REPLACE{$a} ;
} else {
print STDERR "Warning: Unmanaged category: '$a'\n" ;
print FILE "Warning: Unmanaged category: '$a'\n" ;
return $a ;
}
}
Expand All @@ -612,3 +617,4 @@ sub myfilter {
$line =~ s/($PRE)(.*)($POST)/"$1".myfilter("$2")."$3"/ge ;
print $line;
}
close(FILE);