diff options
author | Yorhel <git@yorhel.nl> | 2009-07-18 13:04:58 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2009-07-18 13:04:58 +0200 |
commit | 07467841ff1670b2f365aa265de94fb6b5c421b3 (patch) | |
tree | 1bb1230f9e3d3199ccc63013a7122ce30c8ae79c /lib/VNDB/Handler/VNPage.pm | |
parent | 10160385d7c726774b0e1c66f9e06b1f7ba29af2 (diff) |
Modified definition of the anime table
Removed most NOT NULL constraints, and converted lastfetch to a
timestamp data type.
The site has been updated to handle this, but Multi::Anime won't work.
Diffstat (limited to 'lib/VNDB/Handler/VNPage.pm')
-rw-r--r-- | lib/VNDB/Handler/VNPage.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/VNDB/Handler/VNPage.pm b/lib/VNDB/Handler/VNPage.pm index 8a3087f2..ed8ad7c0 100644 --- a/lib/VNDB/Handler/VNPage.pm +++ b/lib/VNDB/Handler/VNPage.pm @@ -327,9 +327,9 @@ sub _anime { td 'Related anime'; td class => 'anime'; for (sort { ($a->{year}||9999) <=> ($b->{year}||9999) } @{$v->{anime}}) { - if($_->{lastfetch} < 1) { + if(!$_->{lastfetch} || !$_->{year} || !$_->{title_romaji}) { b; - txt $_->{lastfetch} < 0 ? '[unknown anidb id: ' : '[no information available at this time: '; + txt '[no information available at this time: '; a href => "http://anidb.net/a$_->{id}", $_->{id}; txt ']'; end; @@ -347,8 +347,8 @@ sub _anime { } txt '] '; end; - acronym title => $_->{title_kanji}, shorten $_->{title_romaji}, 50; - b ' ('.($self->{anime_types}[$_->{type}][0] eq 'unknown' ? '' : $self->{anime_types}[$_->{type}][0].', ').$_->{year}.')'; + acronym title => $_->{title_kanji}||$_->{title_romaji}, shorten $_->{title_romaji}, 50; + b ' ('.(defined $_->{type} ? $self->{anime_types}[$_->{type}].', ' : '').$_->{year}.')'; txt "\n"; } } |