Add SFW support for VNDB
This commit is contained in:
parent
5e5407f8de
commit
9960a1e3f3
1 changed files with 8 additions and 1 deletions
|
|
@ -113,8 +113,15 @@ export class VNDBAPI extends APIModel {
|
|||
async searchByTitle(title: string): Promise<MediaTypeModel[]> {
|
||||
console.log(`MDB | api "${this.apiName}" queried by Title`);
|
||||
|
||||
// prettier-ignore
|
||||
const vnData = await this.postVNQuery(`{
|
||||
"filters": ["search", "=", "${title}"],
|
||||
"filters": ["and", ${!this.plugin.settings.sfwFilter ? `` :
|
||||
`["release", "!=", ["and",
|
||||
["official", "=", "1"],
|
||||
["has_ero", "=", "1"]
|
||||
]],`}
|
||||
["search", "=", "${title}"]
|
||||
],
|
||||
"fields": "title, titles{title, lang}, released",
|
||||
"sort": "searchrank",
|
||||
"results": 20
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue