Change re-queue text to retry

This commit is contained in:
arabcoders 2025-06-22 18:03:12 +03:00
parent a2f5c770c6
commit d0630f7415
4 changed files with 16 additions and 16 deletions

View file

@ -1002,4 +1002,4 @@ class DownloadQueue(metaclass=Singleton):
except Exception as e: except Exception as e:
self.done.put(item) self.done.put(item)
LOG.exception(e) LOG.exception(e)
LOG.error(f"Failed to re-queue item '{item_ref}'. {e!s}") LOG.error(f"Failed to retry item '{item_ref}'. {e!s}")

View file

@ -39,7 +39,7 @@ class Item:
"""Extra data to be added to the download.""" """Extra data to be added to the download."""
requeued: bool = False requeued: bool = False
"""If the item has been re-queued already via conditions.""" """If the item has been retried already via conditions."""
def serialize(self) -> dict: def serialize(self) -> dict:
return self.__dict__.copy() return self.__dict__.copy()

View file

@ -28,7 +28,7 @@ class Condition:
"""The filter to run on info dict.""" """The filter to run on info dict."""
cli: str cli: str
"""If matched append this to the download request and re-queue.""" """If matched append this to the download request and retry."""
def serialize(self) -> dict: def serialize(self) -> dict:
return self.__dict__ return self.__dict__

View file

@ -55,10 +55,10 @@
</button> </button>
</div> </div>
<div class="column is-half-mobile" v-if="hasIncomplete"> <div class="column is-half-mobile" v-if="hasIncomplete">
<button type="button" class="button is-fullwidth is-warning is-inverted" @click="requeueIncomplete"> <button type="button" class="button is-fullwidth is-warning is-inverted" @click="retryIncomplete">
<span class="icon-text is-block"> <span class="icon-text is-block">
<span class="icon"><i class="fa-solid fa-rotate-right" /></span> <span class="icon"><i class="fa-solid fa-rotate-right" /></span>
<span>Re-queue Incomplete</span> <span>Retry Incomplete</span>
</span> </span>
</button> </button>
</div> </div>
@ -145,7 +145,7 @@
<td class="is-vcentered has-text-centered is-unselectable" <td class="is-vcentered has-text-centered is-unselectable"
v-if="item.live_in && 'not_live' === item.status"> v-if="item.live_in && 'not_live' === item.status">
<span :date-datetime="item.live_in" class="user-hint" <span :date-datetime="item.live_in" class="user-hint"
v-tooltip="'Will automatically be requeued at: ' + moment(item.live_in).format('YYYY-M-DD H:mm Z')" v-tooltip="'Will automatically be retried at: ' + moment(item.live_in).format('YYYY-M-DD H:mm Z')"
v-rtime="item.live_in" /> v-rtime="item.live_in" />
</td> </td>
<td class="is-vcentered has-text-centered is-unselectable" v-else> <td class="is-vcentered has-text-centered is-unselectable" v-else>
@ -154,8 +154,8 @@
<td class="is-vcentered is-items-center"> <td class="is-vcentered is-items-center">
<div class="field is-grouped is-grouped-centered"> <div class="field is-grouped is-grouped-centered">
<div class="control" v-if="item.status != 'finished' || !item.filename"> <div class="control" v-if="item.status != 'finished' || !item.filename">
<button class="button is-warning is-fullwidth is-small" v-tooltip="'Re-queue video'" <button class="button is-warning is-fullwidth is-small" v-tooltip="'Retry download'"
@click="(event) => reQueueItem(item, event)"> @click="(event) => retryItem(item, event)">
<span class="icon"><i class="fa-solid fa-rotate-right" /></span> <span class="icon"><i class="fa-solid fa-rotate-right" /></span>
</button> </button>
</div> </div>
@ -200,7 +200,7 @@
<template v-if="item.status != 'finished' || !item.filename"> <template v-if="item.status != 'finished' || !item.filename">
<hr class="dropdown-divider" /> <hr class="dropdown-divider" />
<NuxtLink class="dropdown-item" @click="reQueueItem(item, true)"> <NuxtLink class="dropdown-item" @click="retryItem(item, true)">
<span class="icon"><i class="fa-solid fa-rotate-right" /></span> <span class="icon"><i class="fa-solid fa-rotate-right" /></span>
<span>Add to download form</span> <span>Add to download form</span>
</NuxtLink> </NuxtLink>
@ -312,10 +312,10 @@
</div> </div>
<div class="columns is-mobile is-multiline"> <div class="columns is-mobile is-multiline">
<div class="column is-half-mobile" v-if="item.status != 'finished' || !item.filename"> <div class="column is-half-mobile" v-if="item.status != 'finished' || !item.filename">
<a class="button is-warning is-fullwidth" @click="(event) => reQueueItem(item, event)"> <a class="button is-warning is-fullwidth" @click="(event) => retryItem(item, event)">
<span class="icon-text is-block"> <span class="icon-text is-block">
<span class="icon"><i class="fa-solid fa-rotate-right" /></span> <span class="icon"><i class="fa-solid fa-rotate-right" /></span>
<span>Re-queue</span> <span>Retry</span>
</span> </span>
</a> </a>
</div> </div>
@ -370,7 +370,7 @@
<template v-if="item.status != 'finished' || !item.filename"> <template v-if="item.status != 'finished' || !item.filename">
<hr class="dropdown-divider" /> <hr class="dropdown-divider" />
<NuxtLink class="dropdown-item" @click="reQueueItem(item, true)"> <NuxtLink class="dropdown-item" @click="retryItem(item, true)">
<span class="icon"><i class="fa-solid fa-rotate-right" /></span> <span class="icon"><i class="fa-solid fa-rotate-right" /></span>
<span>Add to download form</span> <span>Add to download form</span>
</NuxtLink> </NuxtLink>
@ -719,8 +719,8 @@ const setStatus = item => {
return item.status return item.status
} }
const requeueIncomplete = () => { const retryIncomplete = () => {
if (false === box.confirm('Are you sure you want to re-queue all incomplete downloads?')) { if (false === box.confirm('Are you sure you want to retry all incomplete downloads?')) {
return false return false
} }
@ -729,7 +729,7 @@ const requeueIncomplete = () => {
if ('finished' === item.status) { if ('finished' === item.status) {
continue continue
} }
reQueueItem(item) retryItem(item)
} }
} }
@ -784,7 +784,7 @@ const removeItem = item => {
}) })
} }
const reQueueItem = (item, re_add = false) => { const retryItem = (item, re_add = false) => {
const item_req = { const item_req = {
url: item.url, url: item.url,
preset: item.preset, preset: item.preset,