Skip to content

Commit

Permalink
Merge pull request #63 from mvdicarlo/develop
Browse files Browse the repository at this point in the history
v3.0.42
  • Loading branch information
mvdicarlo authored Nov 19, 2021
2 parents 2044a00 + 45fd636 commit be85232
Show file tree
Hide file tree
Showing 9 changed files with 378 additions and 167 deletions.
2 changes: 1 addition & 1 deletion electron-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "postybirb-plus",
"version": "3.0.41",
"version": "3.0.42",
"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",
Expand Down
15 changes: 5 additions & 10 deletions electron-app/src/server/websites/e621/e621.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class e621 extends Website {
async checkLoginStatus(data: UserAccountEntity): Promise<LoginResponse> {
const status: LoginResponse = { loggedIn: false, username: null };
const accountData: e621AccountData = data.data;
if (accountData && accountData.username && accountData.username) {
if (accountData?.username) {
status.username = accountData.username;
status.loggedIn = true;
}
Expand Down Expand Up @@ -97,7 +97,7 @@ export class e621 extends Website {
'upload[description]': data.description,
'upload[parent_id]': data.options.parentId || '',
'upload[source]': [...data.options.sources, ...data.sources]
.filter(s => s)
.filter((s) => s)
.slice(0, 5)
.join('%0A'),
};
Expand Down Expand Up @@ -144,15 +144,12 @@ export class e621 extends Website {
}

formatTags(tags: string[]) {
return super
.formatTags(tags)
.join(' ')
.trim();
return super.formatTags(tags).join(' ').trim();
}

transformAccountData(data: e621AccountData) {
return {
username: data.username,
username: data?.username,
};
}

Expand All @@ -170,9 +167,7 @@ export class e621 extends Website {
}

if (!WebsiteValidator.supportsFileType(submission.primary, this.acceptsFiles)) {
problems.push(
`Currently supported file formats: ${this.acceptsFiles.join(', ')}`,
);
problems.push(`Currently supported file formats: ${this.acceptsFiles.join(', ')}`);
}

const { type, size, name } = submission.primary;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,13 @@ export class FurAffinity extends Website {
private processForError(body: string): string | undefined {
if (body.includes('redirect-message')) {
const $ = cheerio.load(body);
const msg = $('.redirect-message').first().text();
let msg = $('.redirect-message').first().text();

if (msg?.includes('CAPTCHA')) {
msg =
'You need at least 11+ posts on your account before you can use PostyBirb with Fur Affinity.';
}

return msg;
}

Expand Down Expand Up @@ -312,7 +318,9 @@ export class FurAffinity extends Website {
return Promise.reject(this.createPostResponse({ message: err, additionalInfo: body }));
}

return Promise.reject(this.createPostResponse({ message: 'Something went wrong', additionalInfo: body }));
return Promise.reject(
this.createPostResponse({ message: 'Something went wrong', additionalInfo: body }),
);
}

try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export class WebsiteProvider {
readonly newgrounds: Newgrounds,
readonly pixiv: Pixiv,
readonly newTumbl: NewTumbl,
readonly furryLife: FurryLife,
// readonly furryLife: FurryLife,
readonly furryNetwork: FurryNetwork,
readonly patreon: Patreon,
readonly tumblr: Tumblr,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "postybirb-plus",
"version": "3.0.41",
"version": "3.0.42",
"description": "PostyBirb is an application that helps artists post art and other multimedia to multiple websites more quickly..",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "postybirb-plus-ui",
"version": "3.0.41",
"version": "3.0.42",
"license": "BSD-3-Clause",
"private": true,
"Author": "Michael DiCarlo",
Expand Down
3 changes: 1 addition & 2 deletions ui/src/websites/fur-affinity/FurAffinityCategories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ export const FurAffinityCategories = [
<Option value="4">Cellshading</Option>
<Option value="5">Crafting</Option>
<Option value="6">Designs</Option>
<Option value="7">Flash</Option>
<Option value="8">Fursuiting</Option>
<Option value="9">Icons</Option>
<Option value="10">Mosaics</Option>
<Option value="11">Photography</Option>
<Option value="32">Food / Recipes</Option>
<Option value="12">Sculpting</Option>
</OptGroup>,
<OptGroup label="Readable Art">
Expand All @@ -36,7 +36,6 @@ export const FurAffinityCategories = [
<Option value="22">Auctions</Option>
<Option value="23">Contests</Option>
<Option value="24">Current Events</Option>
<Option value="25">Desktops</Option>
<Option value="26">Stockart</Option>
<Option value="27">Screenshots</Option>
<Option value="28">Scraps</Option>
Expand Down
Loading

0 comments on commit be85232

Please sign in to comment.