diff options
author | Yorhel <git@yorhel.nl> | 2019-08-19 19:39:21 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2019-08-19 19:39:21 +0200 |
commit | 72627af4b3f41eae720d03b908a59ca91af14e2a (patch) | |
tree | 62cd14edd0066d1e9f7784f0f9892570c6aad5e1 /lib/VNDB | |
parent | 6e48c37af6b6d17c9004b03d18562f323da0f700 (diff) |
Add Getchu links to releases
Diffstat (limited to 'lib/VNDB')
-rw-r--r-- | lib/VNDB/DB/Releases.pm | 6 | ||||
-rw-r--r-- | lib/VNDB/Handler/Releases.pm | 10 | ||||
-rw-r--r-- | lib/VNDB/Util/Misc.pm | 2 |
3 files changed, 13 insertions, 5 deletions
diff --git a/lib/VNDB/DB/Releases.pm b/lib/VNDB/DB/Releases.pm index cc2f9208..932d458a 100644 --- a/lib/VNDB/DB/Releases.pm +++ b/lib/VNDB/DB/Releases.pm @@ -88,7 +88,7 @@ sub dbReleaseGet { qw|r.id r.title r.original r.website r.released r.minage r.type r.patch|, $o{what} =~ /extended/ ? qw| r.notes r.catalog r.gtin r.resolution r.voiced r.freeware r.doujin r.uncensored r.ani_story r.ani_ero r.engine r.hidden r.locked - r.l_steam r.l_dlsite r.l_dlsiteen r.l_gog r.l_denpa r.l_jlist r.l_gyutto r.l_digiket r.l_melon r.l_mg + r.l_steam r.l_dlsite r.l_dlsiteen r.l_gog r.l_denpa r.l_jlist r.l_gyutto r.l_digiket r.l_melon r.l_mg r.l_getchu r.l_getchudl | : (), $o{pid} ? ('rp.developer', 'rp.publisher') : (), ); @@ -128,7 +128,7 @@ sub dbReleaseGetRev { my $select = 'c.itemid AS id, r.title, r.original, r.website, r.released, r.minage, r.type, r.patch'; $select .= ', r.notes, r.catalog, r.gtin, r.resolution, r.voiced, r.freeware, r.doujin, r.uncensored, r.ani_story, r.ani_ero, r.engine, ro.hidden, ro.locked' if $o{what} =~ /extended/; - $select .= ', r.l_steam, r.l_dlsite, r.l_dlsiteen, r.l_gog, r.l_denpa, r.l_jlist, r.l_gyutto, r.l_digiket, r.l_melon, r.l_mg' if $o{what} =~ /extended/; + $select .= ', r.l_steam, r.l_dlsite, r.l_dlsiteen, r.l_gog, r.l_denpa, r.l_jlist, r.l_gyutto, r.l_digiket, r.l_melon, r.l_mg, r.l_getchu, r.l_getchudl' if $o{what} =~ /extended/; $select .= ', extract(\'epoch\' from c.added) as added, c.requester, c.comments, u.username, c.rev, c.ihid, c.ilock'; $select .= ', c.id AS cid, NOT EXISTS(SELECT 1 FROM changes c2 WHERE c2.type = c.type AND c2.itemid = c.itemid AND c2.rev = c.rev+1) AS lastrev'; @@ -219,7 +219,7 @@ sub dbReleaseRevisionInsert { my %set = map exists($o->{$_}) ? ("$_ = ?", $o->{$_}) : (), qw|title original gtin catalog website released notes minage type - l_steam l_dlsite l_dlsiteen l_gog l_denpa l_jlist l_gyutto l_digiket l_melon l_mg + l_steam l_dlsite l_dlsiteen l_gog l_denpa l_jlist l_gyutto l_digiket l_melon l_mg l_getchu l_getchudl patch resolution voiced freeware doujin uncensored ani_story ani_ero engine|; $self->dbExec('UPDATE edit_releases !H', \%set) if keys %set; diff --git a/lib/VNDB/Handler/Releases.pm b/lib/VNDB/Handler/Releases.pm index 387db3ca..ad212562 100644 --- a/lib/VNDB/Handler/Releases.pm +++ b/lib/VNDB/Handler/Releases.pm @@ -69,6 +69,8 @@ sub page { [ l_digiket => 'Digiket', htmlize => sub { $_[0] ? sprintf '<a href="https://www.digiket.com/work/show/_data/ID=ITM%07d/">%1$d</a>', $_[0] : '[empty]' } ], [ l_melon => 'Melonbooks', htmlize => sub { $_[0] ? sprintf '<a href="https://www.melonbooks.com/index.php?main_page=product_info&products_id=IT%010d">%1$d</a>', $_[0] : '[empty]' } ], [ l_mg => 'MangaGamer', htmlize => sub { $_[0] ? sprintf '<a href="https://www.mangagamer.com/r18/detail.php?product_code=%d">%1$d</a>', $_[0] : '[empty]' } ], + [ l_getchu => 'Getchu', htmlize => sub { $_[0] ? sprintf '<a href="http://www.getchu.com/soft.phtml?id=%d">%1$d</a>', $_[0] : '[empty]' } ], + [ l_getchudl => 'DL.Getchu', htmlize => sub { $_[0] ? sprintf '<a href="http://dl.getchu.com/i/item%d">%1$d</a>', $_[0] : '[empty]' } ], [ released => 'Release date', htmlize => \&fmtdatestr ], [ minage => 'Age rating', serialize => \&minage ], [ notes => 'Notes', diff => qr/[ ,\n\.]/ ], @@ -318,7 +320,7 @@ sub edit { my $vn = $rid ? $r->{vn} : [{ vid => $vid, title => $v->{title} }]; my %b4 = !$rid ? () : ( (map { $_ => $r->{$_} } qw|type title original gtin catalog languages website released minage - l_steam l_dlsite l_dlsiteen l_gog l_denpa l_jlist l_gyutto l_digiket l_melon l_mg + l_steam l_dlsite l_dlsiteen l_gog l_denpa l_jlist l_gyutto l_digiket l_melon l_mg l_getchu l_getchudl notes platforms patch resolution voiced freeware doujin uncensored ani_story ani_ero engine ihid ilock|), media => join(',', sort map "$_->{medium} $_->{qty}", @{$r->{media}}), producers => join('|||', map @@ -354,6 +356,8 @@ sub edit { { post => 'l_digiket', required => 0, default => 0, func => [ sub { $_[0] =~ s/^(?:ITM)?0+//; $_[0] =~ /^[0-9]+$/ }, 'Invalid Digiket ID' ] }, { post => 'l_melon', required => 0, default => 0, func => [ sub { $_[0] =~ s/^(?:IT)?0+//; $_[0] =~ /^[0-9]+$/ }, 'Invalid Melonbooks.com ID' ] }, { post => 'l_mg', required => 0, default => 0, template => 'uint' }, + { post => 'l_getchu', required => 0, default => 0, template => 'uint' }, + { post => 'l_getchudl',required => 0, default => 0, template => 'uint' }, { post => 'released', required => 0, default => 0, template => 'rdate' }, { post => 'minage' , required => 0, default => -1, enum => $self->{age_ratings} }, { post => 'notes', required => 0, default => '', maxlength => 10240 }, @@ -407,7 +411,7 @@ sub edit { if(!$frm->{_err}) { my $nrev = $self->dbItemEdit(r => !$copy && $rid ? ($r->{id}, $r->{rev}) : (undef, undef), (map { $_ => $frm->{$_} } qw| type title original gtin catalog languages website released minage - l_steam l_dlsite l_dlsiteen l_gog l_denpa l_jlist l_gyutto l_digiket l_melon l_mg + l_steam l_dlsite l_dlsiteen l_gog l_denpa l_jlist l_gyutto l_digiket l_melon l_mg l_getchu l_getchudl notes platforms resolution editsum patch voiced freeware doujin uncensored ani_story ani_ero engine ihid ilock|), vn => $new_vn, producers => $producers, @@ -470,6 +474,8 @@ sub _form { [ input => short => 'l_dlsite', name => 'DLsite (jpn)', pre => 'www.dlsite.com/../product_id/', post => ' e.g. "RJ083922"', width => 100 ], [ input => short => 'l_digiket', name => 'Digiket', pre => 'www.digiket.com/work/show/_data/ID=ITM', width => 100 ], [ input => short => 'l_gyutto', name => 'Gyutto', pre => 'gyutto.com/i/item', post => ' (item number)', width => 100 ], + [ input => short => 'l_getchudl',name => 'DL.Getchu', pre => 'dl.getchu.com/i/item', post => ' (item number)', width => 100 ], + [ input => short => 'l_getchu', name => 'Getchu', pre => 'http://www.getchu.com/soft.phtml?id=', width => 100 ], [ input => short => 'l_melon', name => 'Melonbooks.com', pre => 'www.melonbooks.com/..&products_id=IT', width => 100 ], [ static => nolabel => 1, content => '<br>' ], diff --git a/lib/VNDB/Util/Misc.pm b/lib/VNDB/Util/Misc.pm index 49e36459..9f6d1320 100644 --- a/lib/VNDB/Util/Misc.pm +++ b/lib/VNDB/Util/Misc.pm @@ -206,6 +206,8 @@ sub entryLinks { $lnk->($obj->{l_digiket}, 'Digiket', 'https://www.digiket.com/work/show/_data/ID=ITM%07d/'); $lnk->($obj->{l_melon}, 'Melonbooks', 'https://www.melonbooks.com/index.php?main_page=product_info&products_id=IT%010d'); $lnk->($obj->{l_mg}, 'MangaGamer', 'https://www.mangagamer.com/r18/detail.php?product_code=%d'); + $lnk->($obj->{l_getchu}, 'Getchu', 'http://www.getchu.com/soft.phtml?id=%d'); + $lnk->($obj->{l_getchudl}, 'DL.Getchu', 'http://dl.getchu.com/i/item%d'); } # Staff links |