Skip to content

Commit

Permalink
fix: AI param value
Browse files Browse the repository at this point in the history
  • Loading branch information
SaarChaffee committed Mar 4, 2024
1 parent 7534fd3 commit d78c5fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions packages/pixiv/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class PixivImageSource extends ImageSource<PixivImageSource.Config> {
return data.illusts
.filter((illust) => illust.total_bookmarks > this.config.minBookmarks)
.filter((illust) => illust.x_restrict <= this.config.rank)
.filter((illust) => illust.illust_ai_type <= this.config.ai)
.filter((illust) => illust.illust_ai_type >= this.config.ai)
.slice(0, query.count)
.map((illust) => {
let url = ''
Expand Down Expand Up @@ -167,8 +167,7 @@ namespace PixivImageSource {
]).description('年龄分级').default(0),
ai: Schema.union([
Schema.const(0).description('不允许AI作品'),
Schema.const(1).description('允许未知(旧画作或字段未更新)'),
Schema.const(2).description('允许AI作品')
Schema.const(1).description('允许AI作品')
]).description('是否允许搜索AI作品').default(0)
}).description('搜索设置'),
])
Expand Down
4 changes: 2 additions & 2 deletions packages/pixiv/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ export namespace PixivAppApi {

export type SearchTarget = 'partial_match_for_tags' | 'exact_match_for_tags' | 'title_and_caption' | 'keyword'
export enum SearchAIType {
Filtered = 0,
All = 1,
Filtered = 1,
All = '',
}
export type Sort = 'date_desc' | 'date_asc' | 'popular_desc'
export type Duration = 'within_last_day' | 'within_last_week' | 'within_last_month'
Expand Down

0 comments on commit d78c5fc

Please sign in to comment.