fix download fails in batch mode

This commit is contained in:
Julian Freeman
2025-12-30 01:06:44 -04:00
parent 0a439dbd71
commit 63648f9d7c
6 changed files with 14 additions and 8 deletions

View File

@@ -188,7 +188,7 @@ async function startDownload() {
}
for (const entry of selectedEntries) {
const videoUrl = `https://www.youtube.com/watch?v=${entry.id}`
const videoUrl = entry.url || `https://www.youtube.com/watch?v=${entry.id}`
const id = await invoke<string>('start_download', {
url: videoUrl,
options: analysisStore.options,
@@ -264,7 +264,7 @@ async function startDownload() {
>
<List v-if="analysisStore.isBatchMode" class="w-3.5 h-3.5" />
<Link v-else class="w-3.5 h-3.5" />
{{ analysisStore.isBatchMode ? '切换到单链接模式' : '批量输入模式' }}
{{ analysisStore.isBatchMode ? '单链接模式' : '批量输入模式' }}
</button>
</div>
@@ -281,7 +281,7 @@ async function startDownload() {
v-else
v-model="analysisStore.url"
type="text"
placeholder="https://youtube.com/watch?v=..."
placeholder="https://..."
class="w-full bg-gray-50 dark:bg-zinc-800 border-none rounded-xl px-4 py-3 text-zinc-900 dark:text-white focus:ring-2 focus:ring-blue-500 outline-none"
@keyup.enter="analyze"
/>