summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-11-08 17:38:46 +0100
committerYorhel <git@yorhel.nl>2009-11-08 17:38:46 +0100
commit74497ee46cae8ba800228b8820cc474331c8f27a (patch)
tree62323ad9b72aa7f9da366130784e27bd2fbce266
parent047ea9eedbb84573cc68ccb1320fdb32234ccc39 (diff)
API: Added producer filter to the get release command
LOLHTMLTABLES.
-rw-r--r--data/docs/1124
-rw-r--r--lib/Multi/API.pm2
2 files changed, 17 insertions, 9 deletions
diff --git a/data/docs/11 b/data/docs/11
index eb7c3aae..b7f5ad45 100644
--- a/data/docs/11
+++ b/data/docs/11
@@ -578,60 +578,66 @@ however still required.<br />
<td>Find releases linked to the given visual novel ID.</td>
</tr>
<tr class="odd">
+ <td>producer</td>
+ <td>integer</td>
+ <td>=</td>
+ <td>Find releases linked to the given producer ID.</td>
+ </tr>
+ <tr>
<td>title</td>
<td>string</td>
<td>= != ~</td>
<td>&nbsp;</td>
</tr>
- <tr>
+ <tr class="odd">
<td>original</td>
<td>null<br />string</td>
<td>= !=<br />= != ~</td>
<td>&nbsp;</td>
</tr>
- <tr class="odd">
+ <tr>
<td>released</td>
<td>null<br />date (string)</td>
<td>= !=<br />= != &gt; &gt;= &lt; &lt;=</td>
<td>Note about released filter for the vn type also applies here.</td>
</tr>
- <tr>
+ <tr class="odd">
<td>patch</td>
<td>boolean</td>
<td>=</td>
<td>&nbsp;</td>
</tr>
- <tr class="odd">
+ <tr>
<td>freeware</td>
<td>boolean</td>
<td>=</td>
<td>&nbsp;</td>
</tr>
- <tr>
+ <tr class="odd">
<td>doujin</td>
<td>boolean</td>
<td>=</td>
<td>&nbsp;</td>
</tr>
- <tr class="odd">
+ <tr>
<td>type</td>
<td>string</td>
<td>= !=</td>
<td>&nbsp;</td>
</tr>
- <tr>
+ <tr class="odd">
<td>gtin</td>
<td>int</td>
<td>= !=</td>
<td>Value can also be escaped as a string (if you risk an integer overflow otherwise)</td>
</tr>
- <tr class="odd">
+ <tr>
<td>catalog</td>
<td>string</td>
<td>= !=</td>
<td>&nbsp;</td>
</tr>
- <tr>
+ <tr class="odd">
<td>languages</td>
<td>string<br />array of strings</td>
<td>= !=</td>
diff --git a/lib/Multi/API.pm b/lib/Multi/API.pm
index 101d8c29..03d43a6f 100644
--- a/lib/Multi/API.pm
+++ b/lib/Multi/API.pm
@@ -521,6 +521,8 @@ sub get_release {
[ inta => 'r.id :op:(:value:)', {'=' => 'IN', '!=' => 'NOT IN'}, join => ',' ],
], [ 'vn',
[ 'int' => 'rr.id IN(SELECT rv.rid FROM releases_vn rv WHERE rv.vid = :value:)', {'=',1} ],
+ ], [ 'producer',
+ [ 'int' => 'rr.id IN(SELECT rp.rid FROM releases_producers rp WHERE rp.pid = :value:)', {'=',1} ],
], [ 'title',
[ str => 'rr.title :op: :value:', {qw|= = != <>|} ],
[ str => 'rr.title ILIKE :value:', {'~',1}, process => \'like' ],