summaryrefslogtreecommitdiff
path: root/lib/VNDB
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2018-10-31 09:47:15 +0100
committerYorhel <git@yorhel.nl>2018-10-31 09:47:17 +0100
commit08a13ed84b13d3d5e9f90cceac4aa37fb484c373 (patch)
tree77d9ba34a17aff23b832ff2df9356e895807c98e /lib/VNDB
parent128df7bfcdc0e2305acec6de2dabf849afa893bd (diff)
VNEdit: Remove "import cast" functionality
https://vndb.org/t950.521
Diffstat (limited to 'lib/VNDB')
-rw-r--r--lib/VNDB/DB/VN.pm14
-rw-r--r--lib/VNDB/Handler/VNEdit.pm9
2 files changed, 1 insertions, 22 deletions
diff --git a/lib/VNDB/DB/VN.pm b/lib/VNDB/DB/VN.pm
index 5412ed2a..a057b166 100644
--- a/lib/VNDB/DB/VN.pm
+++ b/lib/VNDB/DB/VN.pm
@@ -8,7 +8,7 @@ use POSIX 'strftime';
use Exporter 'import';
use VNDB::Func 'normalize_query';
-our @EXPORT = qw|dbVNGet dbVNGetRev dbVNRevisionInsert dbVNImageId dbScreenshotAdd dbScreenshotGet dbScreenshotRandom dbVNImportSeiyuu|;
+our @EXPORT = qw|dbVNGet dbVNGetRev dbVNRevisionInsert dbVNImageId dbScreenshotAdd dbScreenshotGet dbScreenshotRandom|;
# Options: id, char, search, length, lang, olang, plat, tag_inc, tag_exc, tagspoil,
@@ -350,16 +350,4 @@ sub dbScreenshotRandom {
}
-# returns seiyuus that voice characters referenced by $cids in VNs other than $vid
-sub dbVNImportSeiyuu {
- my($self, $vid, $cids) = @_;
- return $self->dbAll(q|
- SELECT DISTINCT ON(c.id) c.id AS cid, c.name AS c_name, sa.id AS sid, sa.aid, sa.name
- FROM vn_seiyuu vs
- JOIN chars c ON c.id = vs.cid
- JOIN staff_alias sa ON sa.aid = vs.aid
- WHERE vs.cid IN(!l) AND vs.id <> ?|, $cids, $vid);
-}
-
-
1;
diff --git a/lib/VNDB/Handler/VNEdit.pm b/lib/VNDB/Handler/VNEdit.pm
index e08925f7..cd0d9550 100644
--- a/lib/VNDB/Handler/VNEdit.pm
+++ b/lib/VNDB/Handler/VNEdit.pm
@@ -253,7 +253,6 @@ sub _uploadimage {
sub _form {
my($self, $v, $frm, $r, $chars) = @_;
- my $import = @$chars ? $self->dbVNImportSeiyuu($v->{id}, [ map $_->{id}, @$chars ]) : [];
$self->htmlForm({ frm => $frm, action => $v ? "/v$v->{id}/edit" : '/v/new', editsum => 1, upload => 1 },
vn_geninfo => [ 'General info',
[ input => short => 'title', name => 'Title (romaji)', width => 450 ],
@@ -341,14 +340,6 @@ sub _form {
@{$chars} ? (vn_cast => [ 'Cast',
[ json => short => 'seiyuu' ],
[ static => nolabel => 1, content => sub {
- if (@$import) {
- script_json castimpdata => [
- map { my $c = $_; +{ map { $_ => $c->{$_} } qw|cid sid aid name| } } @$import
- ];
- div id => 'cast_import';
- a href => '#', title => 'Import character cast from related visual novels', 'Import cast';
- end;
- }
table; tbody id => 'cast_tbl';
Tr id => 'cast_loading'; td colspan => '4', 'Loading...'; end;
end; end;