Browse Source

1 line disaster fix. File name fix.

tags/v1.4.4
Ivan Bravo Bravo 1 year ago
parent
commit
8e8814c594
4 changed files with 29 additions and 24 deletions
  1. 2
    5
      src/modules/nudify/photo-run.js
  2. 2
    2
      src/modules/updater/base.js
  3. 1
    1
      src/package.json
  4. 24
    16
      src/scripts/release.js

+ 2
- 5
src/modules/nudify/photo-run.js View File

@@ -8,7 +8,7 @@
// Written by Ivan Bravo Bravo <ivan@dreamnet.tech>, 2019.

import {
isNil, isEmpty, truncate, deburr, forIn, cloneDeep, random, toString,
isNil, isEmpty, truncate, deburr, forIn, cloneDeep, random, toString, trim, kebabCase,
} from 'lodash'
import deferred from 'deferred'
import Swal from 'sweetalert2/dist/sweetalert2.js'
@@ -93,10 +93,7 @@ export class PhotoRun {
const now = Date.now()
const { file } = this.photo

const originalName = truncate(
deburr(file.name),
{ length: 30, omission: '' },
)
const originalName = trim(kebabCase(truncate(deburr(file.name), { length: 20, omission: '' })))

return `${originalName}-${this.id}${now}-dreamtime${file.extension}`
}

+ 2
- 2
src/modules/updater/base.js View File

@@ -217,10 +217,10 @@ export class BaseUpdater {
await this._fetchReleases()
this.consola.info(`Current: ${this.currentVersion} - Latest: ${this.latestCompatibleVersion}`)

this.refresh()

this.enabled = true

this.refresh()

if (this.available) {
this.sendNotification()
}

+ 1
- 1
src/package.json View File

@@ -4,7 +4,7 @@
"description": "An open-source and super-improved version of DeepNude.",
"author": "DreamNet",
"homepage": "https://time.dreamnet.tech",
"version": "1.3.4",
"version": "1.3.5",
"main": "electron/dist/index.js",
"license": "GPL-3.0-only",
"private": true,

+ 24
- 16
src/scripts/release.js View File

@@ -146,7 +146,7 @@ function Release(extension) {

return response
} catch (err) {
console.warn(`${url} error`, err.response)
console.warn(`${url} error`, err)
return null
}
}
@@ -188,26 +188,31 @@ function Release(extension) {
return
}

let workload = []
if (!GitHub.isTagRelease) {
return
}

if (GitHub.isTagRelease) {
workload.push(this.uploadToGithub())
workload.push(this.uploadToDreamLink())
await this.uploadToGithub()
await this.uploadToDreamLink()
}

await Promise.all(workload)
workload = []
}
this.uploadOthers = async () => {
if (!fs.existsSync(this.filePath)) {
console.log('No release found!', {
filePath: this.filePath,
fileName: this.fileName,
})

if (process.env.TEST) {
workload.push(this.uploadToDreamLink())
} else {
workload.push([
this.uploadToAnon(),
this.uploadToFileIo(),
this.uploadToInfura(),
])
return
}

const workload = []

workload.push([
this.uploadToAnon(),
this.uploadToFileIo(),
])

await Promise.all(workload)
}
}
@@ -222,6 +227,9 @@ const portable = new Release('zip')
async function main() {
await installer.upload()
await portable.upload()

await installer.uploadOthers()
await portable.uploadOthers()
}

main()

Loading…
Cancel
Save