summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/docs/1154
-rw-r--r--lib/Multi/API.pm20
2 files changed, 69 insertions, 5 deletions
diff --git a/data/docs/11 b/data/docs/11
index dd8f9be3..e9678e88 100644
--- a/data/docs/11
+++ b/data/docs/11
@@ -721,6 +721,35 @@ however still required.<br />
</td>
</tr>
<tr class="odd">
+ <td>resolution</td>
+ <td>details</td>
+ <td>string</td>
+ <td>yes</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>voiced</td>
+ <td>details</td>
+ <td>integer</td>
+ <td>yes</td>
+ <td>1 = Not voiced, 2 = Only ero scenes voiced, 3 = Partially voiced, 4 = Fully voiced</td>
+ </tr>
+ <tr class="odd">
+ <td>animated</td>
+ <td>details</td>
+ <td>array of integers</td>
+ <td>no</td>
+ <td>
+ The array has two integer members, the first one indicating the story
+ animations, the second the ero scene animations. Both members can be null
+ if unknown or not applicable.<br />
+ <br />
+ When not null, the number indicates the following: 1 = No animations, 2 =
+ Simple animations, 3 = Some fully animated scenes, 4 = All scenes fully
+ animated.
+ </td>
+ </tr>
+ <tr>
<td>vn</td>
<td>vn</td>
<td>array of objects</td>
@@ -730,7 +759,7 @@ however still required.<br />
id, title and original. These are the same as the members of the "get vn" command.
</td>
</tr>
- <tr>
+ <tr class="odd">
<td>producers</td>
<td>producers</td>
<td>array of objects</td>
@@ -764,8 +793,8 @@ however still required.<br />
</tr>
<tr>
<td>vn</td>
- <td>integer</td>
- <td>=</td>
+ <td>integer<br />array of integers</td>
+ <td>= !=</td>
<td>Find releases linked to the given visual novel ID.</td>
</tr>
<tr class="odd">
@@ -834,6 +863,12 @@ however still required.<br />
<td>= !=</td>
<td>&nbsp;</td>
</tr>
+ <tr class="odd">
+ <td>platforms</td>
+ <td>string<br />array of strings</td>
+ <td>= !=</td>
+ <td>&nbsp;</td>
+ </tr>
</table>
:SUBSUB:get producer
@@ -1330,6 +1365,12 @@ Returned members:</p>
<td>=<br />=</td>
<td>&nbsp;</td>
</tr>
+ <tr>
+ <td>search</td>
+ <td>string</td>
+ <td>~</td>
+ <td>Searched through all aliases, both the romanized and original names.</td>
+ </tr>
</table>
@@ -1714,6 +1755,13 @@ Returned members:</p>
Check out the <a href="/t/an">announcements board</a> for more information about updates.
<br /><br />
</p>
+<b>2017-06-21</b>
+<ul>
+ <li>Add "resolution", "voiced", "animation" members to "get release" command</li>
+ <li>Add "platforms" filter to "get release" command</li>
+ <li>Accept arrays for the "vn" filter to the "get release" command</li>
+ <li>Add "search" filter to "get staff"</li>
+</ul>
<b>2017-05-22</b>
<ul>
<li>Add "vns" and "voiced" flags to "get staff" command</li>
diff --git a/lib/Multi/API.pm b/lib/Multi/API.pm
index a898a7d8..9ad2a33a 100644
--- a/lib/Multi/API.pm
+++ b/lib/Multi/API.pm
@@ -593,13 +593,21 @@ my %GET_RELEASE = (
]],
},
details => {
- select => 'r.website, r.notes, r.minage, r.gtin, r.catalog',
+ select => 'r.website, r.notes, r.minage, r.gtin, r.catalog, r.resolution, r.voiced, r.ani_story, r.ani_ero',
proc => sub {
$_[0]{website} ||= undef;
$_[0]{notes} ||= undef;
$_[0]{minage} = $_[0]{minage} < 0 ? undef : $_[0]{minage}*1;
$_[0]{gtin} ||= undef;
$_[0]{catalog} ||= undef;
+ $_[0]{resolution} = $_[0]{resolution} ? $VNDB::S{resolutions}[ $_[0]{resolution} ][0] : undef;
+ $_[0]{voiced} = $_[0]{voiced} ? $_[0]{voiced}*1 : undef;
+ $_[0]{animation} = [
+ $_[0]{ani_story} ? $_[0]{ani_story}*1 : undef,
+ $_[0]{ani_ero} ? $_[0]{ani_ero}*1 : undef
+ ];
+ delete($_[0]{ani_story});
+ delete($_[0]{ani_ero});
},
fetch => [
[ 'id', 'SELECT id, platform FROM releases_platforms WHERE id IN(%s)',
@@ -659,7 +667,8 @@ my %GET_RELEASE = (
[ inta => 'r.id :op:(:value:)', {'=' => 'IN', '!=' => 'NOT IN'}, join => ',', range => [1,1e6] ],
],
vn => [
- [ 'int' => 'r.id IN(SELECT rv.id FROM releases_vn rv WHERE rv.vid = :value:)', {'=',1}, range => [1,1e6] ],
+ [ 'int' => 'r.id :op:(SELECT rv.id FROM releases_vn rv WHERE rv.vid = :value:)', {'=' => 'IN', '!=' => 'NOT IN'}, range => [1,1e6] ],
+ [ inta => 'r.id :op:(SELECT rv.id FROM releases_vn rv WHERE rv.vid IN(:value:))', {'=' => 'IN', '!=' => 'NOT IN'}, join => ',', range => [1,1e6] ],
],
producer => [
[ 'int' => 'r.id IN(SELECT rp.id FROM releases_producers rp WHERE rp.pid = :value:)', {'=',1}, range => [1,1e6] ],
@@ -694,6 +703,10 @@ my %GET_RELEASE = (
[ str => 'r.id :op:(SELECT rl.id FROM releases_lang rl WHERE rl.lang = :value:)', {'=' => 'IN', '!=' => 'NOT IN'}, process => \'lang' ],
[ stra => 'r.id :op:(SELECT rl.id FROM releases_lang rl WHERE rl.lang IN(:value:))', {'=' => 'IN', '!=' => 'NOT IN'}, join => ',', process => \'lang' ],
],
+ platforms => [
+ [ str => 'r.id :op:(SELECT rp.id FROM releases_platforms rp WHERE rp.platform = :value:)', {'=' => 'IN', '!=' => 'NOT IN'}, process => \'plat' ],
+ [ stra => 'r.id :op:(SELECT rp.id FROM releases_platforms rp WHERE rp.platform IN(:value:))', {'=' => 'IN', '!=' => 'NOT IN'}, join => ',', process => \'plat' ],
+ ],
},
);
@@ -959,6 +972,9 @@ my %GET_STAFF = (
[ 'int' => 's.id IN(SELECT sa.id FROM staff_alias sa WHERE sa.aid = :value:)', {'=',1}, range => [1,1e6] ],
[ inta => 's.id IN(SELECT sa.id FROM staff_alias sa WHERE sa.aid IN(:value:))', {'=',1}, range => [1,1e6], join => ',' ],
],
+ search => [
+ [ str => 's.id IN(SELECT sa.id FROM staff_alias sa WHERE sa.name ILIKE :value: OR sa.original ILIKE :value:)', {'~',1}, process => \'like' ],
+ ],
},
);