updated dependencies and added dl path saver

This commit is contained in:
Daniel Haller 2024-04-24 22:03:19 +02:00
parent e84d9e7d45
commit 5e1963a0ad
4 changed files with 8185 additions and 6520 deletions

View File

@ -17,7 +17,7 @@
}, },
"devDependencies": { "devDependencies": {
"@nuxtjs/eslint-config-typescript": "^12.1.0", "@nuxtjs/eslint-config-typescript": "^12.1.0",
"@nuxtjs/tailwindcss": "^6.11.4", "@nuxtjs/tailwindcss": "^6.12.0",
"@types/express": "^4.17.21", "@types/express": "^4.17.21",
"concurrently": "^8.2.2", "concurrently": "^8.2.2",
"electron": "^23.3.13", "electron": "^23.3.13",
@ -28,10 +28,10 @@
"nuxt": "^3.11.2", "nuxt": "^3.11.2",
"nuxt-icon": "^0.6.10", "nuxt-icon": "^0.6.10",
"prettier": "^2.8.8", "prettier": "^2.8.8",
"sass": "^1.74.1", "sass": "^1.75.0",
"sass-loader": "^13.3.3", "sass-loader": "^13.3.3",
"tsc-watch": "^6.2.0", "tsc-watch": "^6.2.0",
"typescript": "^5.4.4", "typescript": "^5.4.5",
"wait-on": "^7.2.0" "wait-on": "^7.2.0"
}, },
"dependencies": { "dependencies": {
@ -44,6 +44,7 @@
"ass-compiler": "^0.1.11", "ass-compiler": "^0.1.11",
"crypto-js": "^4.2.0", "crypto-js": "^4.2.0",
"electron-log": "^5.1.2", "electron-log": "^5.1.2",
"electron-settings": "^4.0.4",
"electron-updater": "^5.3.0", "electron-updater": "^5.3.0",
"express": "^4.19.2", "express": "^4.19.2",
"fastify": "^4.26.2", "fastify": "^4.26.2",
@ -54,7 +55,7 @@
"mpd-parser": "^1.3.0", "mpd-parser": "^1.3.0",
"node-cache": "^5.1.2", "node-cache": "^5.1.2",
"node-cron": "^3.0.3", "node-cron": "^3.0.3",
"sequelize": "^6.37.2", "sequelize": "^6.37.3",
"sqlite3": "5.1.6", "sqlite3": "5.1.6",
"uuid": "^9.0.1" "uuid": "^9.0.1"
}, },

File diff suppressed because it is too large Load Diff

View File

@ -638,7 +638,7 @@ async function mergeVideoFile(video: string, audios: Array<string>, subs: Array<
var output = Ffmpeg().setFfmpegPath(ffmpegPath).setFfprobePath(ffprobePath) var output = Ffmpeg().setFfmpegPath(ffmpegPath).setFfprobePath(ffprobePath)
var ffindex = 1 var ffindex = 1
output.addInput(video) output.addInput(video)
var options = ['-map_metadata -1', '-c copy', '-metadata:s:v:0 VARIANT_BITRATE=0', '-map 0'] var options = ['-map_metadata -1', '-metadata:s:v:0 VENDOR_ID=', '-metadata:s:v:0 language=', '-c copy', '-map 0']
if (format === 'mp4') { if (format === 'mp4') {
options.push('-c:s mov_text') options.push('-c:s mov_text')
} }
@ -663,8 +663,6 @@ async function mergeVideoFile(video: string, audios: Array<string>, subs: Array<
: a.split('/')[1].split('.aac')[0] : a.split('/')[1].split('.aac')[0]
}` }`
) )
options.push(`-metadata:s:a:${index} VARIANT_BITRATE=0`)
} }
options.push(`-disposition:a:0 default`) options.push(`-disposition:a:0 default`)

View File

@ -7,6 +7,7 @@ import titleBarActionsModule from './modules/titleBarActions'
import updaterModule from './modules/updater' import updaterModule from './modules/updater'
import macMenuModule from './modules/macMenu' import macMenuModule from './modules/macMenu'
import startAPI from '../api/api' import startAPI from '../api/api'
import settings from 'electron-settings'
process.env.ELECTRON_DISABLE_SECURITY_WARNINGS = 'true' process.env.ELECTRON_DISABLE_SECURITY_WARNINGS = 'true'
const isProduction = process.env.NODE_ENV !== 'development' const isProduction = process.env.NODE_ENV !== 'development'
@ -144,16 +145,26 @@ ipcMain.handle('dialog:openDirectory', async () => {
properties: ['openDirectory'] properties: ['openDirectory']
}) })
if (canceled) { if (canceled) {
return return await settings.get('downloadPath')
} else { } else {
await settings.set('downloadPath', filePaths[0])
return filePaths[0] return filePaths[0]
} }
}) })
ipcMain.handle('dialog:defaultDirectory', async () => { ipcMain.handle('dialog:defaultDirectory', async () => {
const path = app.getPath('documents') const savedPath = await settings.get('downloadPath')
if (!savedPath) {
const path = app.getPath('documents')
await settings.set('downloadPath', path)
return path
}
return savedPath
return path
}) })
// Quit when all windows are closed, except on macOS. There, it's common // Quit when all windows are closed, except on macOS. There, it's common