Commit 232adcd6 authored by Petter Goksøyr Åsen's avatar Petter Goksøyr Åsen
Browse files

plukkliste: better guess at fiction/nonfiction category

parent 977a3cc3
...@@ -36,6 +36,7 @@ sub category { ...@@ -36,6 +36,7 @@ sub category {
my $fmt = $meta{loc_format}; # 090$b my $fmt = $meta{loc_format}; # 090$b
my $dewey = $meta{loc_dewey}; # 090$c my $dewey = $meta{loc_dewey}; # 090$c
my $location = $meta{location}//''; my $location = $meta{location}//'';
my $fiction = $meta{fiction};
if ($mt =~ m{^(Film|Spill|Tegneserie|Noter|Lydbok|Musikkopptak)$}) { if ($mt =~ m{^(Film|Spill|Tegneserie|Noter|Lydbok|Musikkopptak)$}) {
return $mt; return $mt;
...@@ -45,13 +46,13 @@ sub category { ...@@ -45,13 +46,13 @@ sub category {
} }
if ($fmt =~ m{^\w*[bu]} or $location =~ m{^(BARNEFAG|UNG|UNGFAG)$}) { if ($fmt =~ m{^\w*[bu]} or $location =~ m{^(BARNEFAG|UNG|UNGFAG)$}) {
if ($dewey or $fmt =~ m{E}) { if ($fiction eq "0") {
return 'Fag barn'; return 'Fag barn';
} else { } else {
return 'Skjønn barn'; return 'Skjønn barn';
} }
} else { } else {
if ($dewey) { if ($fiction eq "0") {
return 'Fag voksen'; return 'Fag voksen';
} else { } else {
return 'Skjønn voksen'; return 'Skjønn voksen';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment