diff --git a/commons/src/interfaces/websites/pixiv/pixiv.file.options.interface.ts b/commons/src/interfaces/websites/pixiv/pixiv.file.options.interface.ts index 2de93e0c..7d39d921 100644 --- a/commons/src/interfaces/websites/pixiv/pixiv.file.options.interface.ts +++ b/commons/src/interfaces/websites/pixiv/pixiv.file.options.interface.ts @@ -6,4 +6,5 @@ export interface PixivFileOptions extends DefaultFileOptions { original: boolean; sexual?: boolean; containsContent: string[]; + aiGenerated: boolean; } diff --git a/commons/src/websites/pixiv/pixiv.file.options.ts b/commons/src/websites/pixiv/pixiv.file.options.ts index a49693b4..f63ff93e 100644 --- a/commons/src/websites/pixiv/pixiv.file.options.ts +++ b/commons/src/websites/pixiv/pixiv.file.options.ts @@ -31,6 +31,10 @@ export class PixivFileOptionsEntity extends DefaultFileOptionsEntity implements @DefaultValue([]) containsContent!: string[]; + @Expose() + @DefaultValue(false) + aiGenerated!: boolean; + constructor(entity?: Partial) { super(entity as DefaultFileOptions); } diff --git a/electron-app/package-lock.json b/electron-app/package-lock.json index 768e19e9..587c0f39 100644 --- a/electron-app/package-lock.json +++ b/electron-app/package-lock.json @@ -1,12 +1,12 @@ { "name": "postybirb-plus", - "version": "3.1.0", + "version": "3.1.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "postybirb-plus", - "version": "3.1.0", + "version": "3.1.1", "hasInstallScript": true, "license": "BSD-3-Clause", "dependencies": { diff --git a/electron-app/package.json b/electron-app/package.json index 8c07f5d7..37dd0920 100644 --- a/electron-app/package.json +++ b/electron-app/package.json @@ -1,6 +1,6 @@ { "name": "postybirb-plus", - "version": "3.1.1", + "version": "3.1.2", "description": "(ClientServer) PostyBirb is an application that helps artists post art and other multimedia to multiple websites more quickly.", "main": "dist/main.js", "author": "Michael DiCarlo", diff --git a/electron-app/src/server/websites/pixiv/pixiv.service.ts b/electron-app/src/server/websites/pixiv/pixiv.service.ts index 4e9f17b9..63553e1b 100644 --- a/electron-app/src/server/websites/pixiv/pixiv.service.ts +++ b/electron-app/src/server/websites/pixiv/pixiv.service.ts @@ -85,6 +85,7 @@ export class Pixiv extends Website { 'quality[]': '', quality_text: '', qropen: '', + ai_type: data.options.aiGenerated ? '2' : '1', 'files[]': files, 'file_info[]': files.map(f => JSON.stringify({ @@ -150,7 +151,7 @@ export class Pixiv extends Website { validateFileSubmission( submission: FileSubmission, - submissionPart: SubmissionPart, + submissionPart: SubmissionPart, defaultPart: SubmissionPart, ): ValidationParts { const problems: string[] = []; @@ -173,6 +174,10 @@ export class Pixiv extends Website { ), ]; + if (submissionPart.data.aiGenerated === undefined) { + problems.push('Please specify if the art is AI Generated.'); + } + const maxMB: number = 32; files.forEach(file => { const { type, size, name, mimetype } = file; diff --git a/package.json b/package.json index e97752b3..148eaf0d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "postybirb-plus", - "version": "3.1.1", + "version": "3.1.2", "description": "PostyBirb is an application that helps artists post art and other multimedia to multiple websites more quickly..", "main": "index.js", "scripts": { diff --git a/ui/package-lock.json b/ui/package-lock.json index b33ccd0f..91f1aacd 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -1,12 +1,12 @@ { "name": "postybirb-plus-ui", - "version": "3.1.0", + "version": "3.1.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "postybirb-plus-ui", - "version": "3.1.0", + "version": "3.1.1", "license": "BSD-3-Clause", "dependencies": { "@tinymce/tinymce-react": "^3.8.4", diff --git a/ui/package.json b/ui/package.json index 35743e8e..5f705811 100644 --- a/ui/package.json +++ b/ui/package.json @@ -1,6 +1,6 @@ { "name": "postybirb-plus-ui", - "version": "3.1.1", + "version": "3.1.2", "license": "BSD-3-Clause", "private": true, "Author": "Michael DiCarlo", diff --git a/ui/src/websites/pixiv/Pixiv.tsx b/ui/src/websites/pixiv/Pixiv.tsx index 9b5b4805..8924b090 100644 --- a/ui/src/websites/pixiv/Pixiv.tsx +++ b/ui/src/websites/pixiv/Pixiv.tsx @@ -81,6 +81,14 @@ export class PixivFileSubmissionForm extends GenericFileSubmissionSection Allow other users to edit tags + , +
+ + AI-generated work +
); return elements;