diff options
author | Yorhel <git@yorhel.nl> | 2009-05-23 18:37:01 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2009-05-23 18:37:47 +0200 |
commit | 68b74a26c9c866c0a5ae2c4f269ad6f56037f5d9 (patch) | |
tree | 4cd82a9669e326498cf3b884c35569a56db19d47 /lib | |
parent | e01567fb9703c18f20a3c3f3fcecfdb5bc680701 (diff) |
Animation fields for releases
Diffstat (limited to 'lib')
-rw-r--r-- | lib/VNDB/DB/Releases.pm | 6 | ||||
-rw-r--r-- | lib/VNDB/Handler/Releases.pm | 24 |
2 files changed, 24 insertions, 6 deletions
diff --git a/lib/VNDB/DB/Releases.pm b/lib/VNDB/DB/Releases.pm index 63c99019..d6510322 100644 --- a/lib/VNDB/DB/Releases.pm +++ b/lib/VNDB/DB/Releases.pm @@ -72,7 +72,7 @@ sub dbReleaseGet { my @select = ( qw|r.id rr.title rr.original rr.language rr.website rr.released rr.minage rr.type rr.patch|, 'rr.id AS cid', - $o{what} =~ /extended/ ? qw|rr.notes rr.catalog rr.gtin rr.resolution rr.voiced rr.freeware rr.doujin r.hidden r.locked| : (), + $o{what} =~ /extended/ ? qw|rr.notes rr.catalog rr.gtin rr.resolution rr.voiced rr.freeware rr.doujin rr.ani_story rr.ani_ero r.hidden r.locked| : (), $o{what} =~ /changes/ ? qw|c.added c.requester c.comments r.latest u.username c.rev| : (), ); @@ -168,10 +168,10 @@ sub insert_rev { $self->dbExec(q| INSERT INTO releases_rev (id, rid, title, original, gtin, catalog, language, website, released, - notes, minage, type, patch, resolution, voiced, freeware, doujin) + notes, minage, type, patch, resolution, voiced, freeware, doujin, ani_story, ani_ero) VALUES (!l)|, [ $cid, $rid, @$o{qw| title original gtin catalog language website released - notes minage type patch resolution voiced freeware doujin|} ]); + notes minage type patch resolution voiced freeware doujin ani_story ani_ero|} ]); $self->dbExec(q| INSERT INTO releases_producers (rid, pid) diff --git a/lib/VNDB/Handler/Releases.pm b/lib/VNDB/Handler/Releases.pm index a217a8f8..4dbabf5e 100644 --- a/lib/VNDB/Handler/Releases.pm +++ b/lib/VNDB/Handler/Releases.pm @@ -61,6 +61,8 @@ sub page { } ], [ resolution => 'Resolution', serialize => sub { $self->{resolutions}[$_[0]][0] } ], [ voiced => 'Voiced', serialize => sub { $self->{voiced}[$_[0]] } ], + [ ani_story => 'Story animation',serialize => sub { $self->{animated}[$_[0]] } ], + [ ani_ero => 'Ero animation', serialize => sub { $self->{animated}[$_[0]] } ], [ producers => 'Producers', join => '<br />', split => sub { map sprintf('<a href="/p%d" title="%s">%s</a>', $_->{id}, $_->{original}||$_->{name}, shorten $_->{name}, 50), @{$_[0]}; } ], @@ -172,6 +174,15 @@ sub _infotable { end; } + if($r->{ani_story} || $r->{ani_ero}) { + Tr ++$i % 2 ? (class => 'odd') : (); + td 'Animation'; + td join ', ', + $r->{ani_story} ? ('Story: ' .$self->{animated}[$r->{ani_story}]):(), + $r->{ani_ero} ? ('Ero scenes: '.$self->{animated}[$r->{ani_ero} ]):(); + end; + } + Tr ++$i % 2 ? (class => 'odd') : (); td 'Released'; td; @@ -271,7 +282,7 @@ sub edit { my $vn = $rid ? $r->{vn} : [{ vid => $vid, title => $v->{title} }]; my %b4 = !$rid ? () : ( (map { $_ => $r->{$_} } qw|type title original gtin catalog language website released - notes minage platforms patch resolution voiced freeware doujin|), + notes minage platforms patch resolution voiced freeware doujin ani_story ani_ero|), media => join(',', sort map "$_->{medium} $_->{qty}", @{$r->{media}}), producers => join('|||', map "$_->{id},$_->{name}", sort { $a->{id} <=> $b->{id} } @{$r->{producers}}), ); @@ -298,6 +309,8 @@ sub edit { { name => 'media', required => 0, default => '' }, { name => 'resolution',required => 0, default => 0, enum => [ 0..$#{$self->{resolutions}} ] }, { name => 'voiced', required => 0, default => 0, enum => [ 0..$#{$self->{voiced}} ] }, + { name => 'ani_story', required => 0, default => 0, enum => [ 0..$#{$self->{animated}} ] }, + { name => 'ani_ero', required => 0, default => 0, enum => [ 0..$#{$self->{animated}} ] }, { name => 'producers', required => 0, default => '' }, { name => 'vn', maxlength => 5000 }, { name => 'editsum', maxlength => 5000 }, @@ -319,7 +332,7 @@ sub edit { my %opts = ( (map { $_ => $frm->{$_} } qw| type title original gtin catalog language website released - notes minage platforms resolution editsum patch voiced freeware doujin|), + notes minage platforms resolution editsum patch voiced freeware doujin ani_story ani_ero|), vn => $new_vn, producers => $producers, media => $media, @@ -380,8 +393,13 @@ sub _form { 'Format' => [ [ select => short => 'resolution', name => 'Resolution', options => [ map [ $_, @{$self->{resolutions}[$_]} ], 0..$#{$self->{resolutions}} ] ], - [ select => short => 'voiced', name => 'Voiced', options => [ + [ select => short => 'voiced', name => 'Voiced', options => [ map [ $_, $self->{voiced}[$_] ], 0..$#{$self->{voiced}} ] ], + [ select => short => 'ani_story', name => 'Story animation', options => [ + map [ $_, $self->{animated}[$_] ], 0..$#{$self->{animated}} ] ], + [ select => short => 'ani_ero', name => 'Ero animation', options => [ + map [ $_, $self->{animated}[$_] ], 0..$#{$self->{animated}} ] ], + [ static => content => 'Animation in erotic scenes, leave to unkown if there are no ero scenes.' ], [ hidden => short => 'media' ], [ static => nolabel => 1, content => sub { h2 'Platforms'; |