fixed design and ffmpeg input for dev
This commit is contained in:
parent
ddb9c4e73c
commit
697c6cb803
@ -24,6 +24,7 @@
|
||||
"@pinia/nuxt": "^0.4.11",
|
||||
"@types/express": "^4.17.21",
|
||||
"concurrently": "^8.2.2",
|
||||
"dotenv": "^16.4.5",
|
||||
"electron": "^30.0.1",
|
||||
"electron-builder": "^24.13.3",
|
||||
"eslint": "^8.57.0",
|
||||
|
@ -55,8 +55,10 @@
|
||||
<div class="text-xs uppercase">{{ p.format }}</div>
|
||||
<div class="text-xs">Dubs: {{ p.dub.map((t) => t.name).join(', ') }}</div>
|
||||
<div class="text-xs">Subs: {{ p.sub.length !== 0 ? p.sub.map((t) => t.name).join(', ') : '-' }}</div>
|
||||
<div v-if="p.partsleft && p.status === 'downloading'" class="text-xs ml-auto">{{ p.partsdownloaded }}/{{ p.partsleft }}</div>
|
||||
<div v-if="p.downloadspeed && p.status === 'downloading'" class="text-xs">{{ p.downloadspeed }} MB/s</div>
|
||||
<div class="flex flex-col ml-auto gap-0.5">
|
||||
<div v-if="p.partsleft && p.status === 'downloading'" class="text-xs ml-auto">{{ p.partsdownloaded }}/{{ p.partsleft }}</div>
|
||||
<div v-if="p.downloadspeed && p.status === 'downloading'" class="text-xs">{{ p.downloadspeed }} MB/s</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -68,7 +70,7 @@
|
||||
<script lang="ts" setup>
|
||||
import type { ADNEpisode } from '~/components/ADN/Types'
|
||||
import type { CrunchyEpisode } from '~/components/Episode/Types'
|
||||
import Updater from '~/components/Updater.vue';
|
||||
import Updater from '~/components/Updater.vue'
|
||||
|
||||
const playlist = ref<
|
||||
Array<{
|
||||
|
@ -84,6 +84,9 @@ importers:
|
||||
concurrently:
|
||||
specifier: ^8.2.2
|
||||
version: 8.2.2
|
||||
dotenv:
|
||||
specifier: ^16.4.5
|
||||
version: 16.4.5
|
||||
electron:
|
||||
specifier: ^30.0.1
|
||||
version: 30.0.1
|
||||
|
@ -638,6 +638,7 @@ async function mergeParts(parts: { filename: string; url: string }[], downloadID
|
||||
await concatenateTSFiles(list, concatenatedFile)
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
if (!ffmpegP.ffmpeg || !ffmpegP.ffprobe) return
|
||||
Ffmpeg()
|
||||
.setFfmpegPath(ffmpegP.ffmpeg)
|
||||
.setFfprobePath(ffmpegP.ffprobe)
|
||||
@ -684,6 +685,7 @@ async function mergeVideoFile(video: string, audios: Array<string>, subs: Array<
|
||||
]
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
if (!ffmpegP.ffmpeg || !ffmpegP.ffprobe) return
|
||||
var output = Ffmpeg().setFfmpegPath(ffmpegP.ffmpeg).setFfprobePath(ffmpegP.ffprobe)
|
||||
var ffindex = 1
|
||||
output.addInput(video)
|
||||
|
@ -70,6 +70,7 @@ async function mergePartsAudio(parts: { filename: string; url: string }[], tmp:
|
||||
await concatenateTSFiles(list, concatenatedFile)
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
if (!ffmpegP.ffmpeg || !ffmpegP.ffprobe) return
|
||||
Ffmpeg()
|
||||
.setFfmpegPath(ffmpegP.ffmpeg)
|
||||
.setFfprobePath(ffmpegP.ffprobe)
|
||||
|
@ -5,11 +5,17 @@ const isDev = process.env.NODE_ENV === 'development'
|
||||
const appPath = app.getAppPath()
|
||||
const resourcesPath = path.dirname(appPath)
|
||||
const ffmpegPath = path.join(resourcesPath, 'ffmpeg')
|
||||
if (isDev) {
|
||||
require('dotenv').config()
|
||||
}
|
||||
|
||||
export function getFFMPEGPath() {
|
||||
if (isDev) {
|
||||
const ffmpeg = '../../../ffmpeg/ffmpeg.exe'
|
||||
const ffprobe = '../../../ffmpeg/ffprobe.exe'
|
||||
const ffmpeg = process.env.FFMPEG_PATH
|
||||
const ffprobe = process.env.FFPROBE_PATH
|
||||
|
||||
console.log(ffmpeg)
|
||||
console.log(ffprobe)
|
||||
|
||||
return { ffmpeg: ffmpeg, ffprobe: ffprobe }
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user