Merge pull request #37 from ArabCoders/dev
Fixed bug in mass requeuing failed items.
This commit is contained in:
commit
d15bd0fa00
2 changed files with 15 additions and 22 deletions
|
|
@ -114,7 +114,7 @@
|
|||
<div class="columns">
|
||||
<div class="column" v-if="item.status != 'finished'">
|
||||
<a class="button is-warning is-fullwidth" data-tooltip="Re-queue failed download."
|
||||
@click="reQueueItem(item._id, item)">
|
||||
@click="reQueueItem(item)">
|
||||
<span class="icon-text">
|
||||
<span class="icon">
|
||||
<font-awesome-icon icon="fa-solid fa-rotate-right" />
|
||||
|
|
@ -281,31 +281,29 @@ const clearFailed = () => {
|
|||
}
|
||||
|
||||
const requeueFailed = () => {
|
||||
const state = confirm('Are you sure you want to re-queue all failed downloads?');
|
||||
if (false === state) {
|
||||
return;
|
||||
if (false === confirm('Are you sure you want to re-queue all failed downloads?')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const keys = {};
|
||||
|
||||
for (const key in props.completed) {
|
||||
if (props.completed[key].status !== 'finished') {
|
||||
keys[key] = props.completed[key]._id;
|
||||
const item = props.completed[key];
|
||||
if (item.status !== 'finished') {
|
||||
emits('deleteItem', 'completed', key);
|
||||
emits('addItem', {
|
||||
url: props.completed[key].url,
|
||||
format: props.completed[key].format,
|
||||
quality: props.completed[key].quality,
|
||||
path: props.completed[key].folder,
|
||||
ytdlp_config: props.completed[key].ytdlp_config,
|
||||
ytdlp_cookies: props.completed[key].ytdlp_cookies,
|
||||
url: item.url,
|
||||
format: item.format,
|
||||
quality: item.quality,
|
||||
folder: item.folder,
|
||||
ytdlp_config: item.ytdlp_config,
|
||||
ytdlp_cookies: item.ytdlp_cookies,
|
||||
output_template: item.output_template,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const reQueueItem = (id, item) => {
|
||||
emits('deleteItem', 'completed', id);
|
||||
const reQueueItem = (item) => {
|
||||
emits('deleteItem', 'completed', item._id);
|
||||
emits('addItem', {
|
||||
url: item.url,
|
||||
format: item.format,
|
||||
|
|
|
|||
|
|
@ -1,12 +1,7 @@
|
|||
<template>
|
||||
<div class="columns is-multiline mt-3">
|
||||
<div class="column has-text-left">
|
||||
{{ Year }} © YTPtube - {{ app_version }}
|
||||
</div>
|
||||
<div class="column has-text-right">
|
||||
<a href="https://github.com/ArabCoders/ytptube" target="_blank">
|
||||
Github
|
||||
</a>
|
||||
© {{ Year }} <a href="https://github.com/ArabCoders/ytptube" target="_blank">YTPTube</a> - {{ app_version }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
|||
Loading…
Reference in a new issue