diff --git a/app/library/DownloadQueue.py b/app/library/DownloadQueue.py index d9e894e6..5e87678d 100644 --- a/app/library/DownloadQueue.py +++ b/app/library/DownloadQueue.py @@ -18,7 +18,7 @@ from .AsyncPool import AsyncPool from .config import Config from .DataStore import DataStore from .Download import Download -from .Events import EventBus, Events +from .Events import EventBus, Events, info from .ItemDTO import Item, ItemDTO from .Presets import Presets from .Singleton import Singleton @@ -307,6 +307,14 @@ class DownloadQueue(metaclass=Singleton): dlInfo.info.status = "not_live" itemDownload = self.done.put(dlInfo) NotifyEvent = Events.COMPLETED + log_message = f"{dl.title or dl.id or dl._id}: stream is not live yet." + if dlInfo.info.live_in: + log_message += f" Will start in {dlInfo.info.live_in}." + + await self._notify.emit( + Events.LOG_INFO, + data=info(msg=log_message, data=itemDownload.info.serialize()), + ) elif self.config.allow_manifestless is False and is_manifestless is True: dlInfo.info.status = "error" dlInfo.info.error = "Video is in post-live manifestless mode." diff --git a/ui/assets/css/style.css b/ui/assets/css/style.css index 9292c447..db506ea5 100644 --- a/ui/assets/css/style.css +++ b/ui/assets/css/style.css @@ -309,3 +309,7 @@ hr { .is-auto { unicode-bidi: embed; } + +.is-justify-self-end { + justify-self: end; +} diff --git a/ui/components/History.vue b/ui/components/History.vue index f6fca351..3e424c24 100644 --- a/ui/components/History.vue +++ b/ui/components/History.vue @@ -153,7 +153,7 @@
@@ -283,7 +283,7 @@
- + Re-queue @@ -371,13 +371,13 @@ import moment from 'moment' import { useStorage } from '@vueuse/core' import { makeDownload, formatBytes } from '~/utils/index' -import toast from '~/plugins/toast' import { isEmbedable, getEmbedable } from '~/utils/embedable' -const emitter = defineEmits(['getInfo']) +const emitter = defineEmits(['getInfo', 'add_new']) const config = useConfigStore() const stateStore = useStateStore() const socket = useSocketStore() +const toast = useToast() const selectedElms = ref([]) const masterSelectAll = ref(false) @@ -624,9 +624,7 @@ const removeItem = item => { }) } -const reQueueItem = item => { - socket.emit('item_delete', { id: item._id, remove_file: false }) - +const reQueueItem = (item, event = null) => { let extras = {} if (item.extras) { @@ -637,7 +635,7 @@ const reQueueItem = item => { }) } - socket.emit('add_url', { + const item_req = { url: item.url, preset: item.preset, folder: item.folder, @@ -645,7 +643,17 @@ const reQueueItem = item => { template: item.template, cli: item?.cli, extras: extras - }) + }; + + socket.emit('item_delete', { id: item._id, remove_file: false }) + + if (event && (event?.altKey && true === event?.altKey)) { + toast.info('Removed the item from history, and added it to the new download form.') + emitter('add_new', item_req) + return + } + + socket.emit('add_url', item_req) } const pImg = e => e.target.naturalHeight > e.target.naturalWidth ? e.target.classList.add('image-portrait') : null diff --git a/ui/components/NewDownload.vue b/ui/components/NewDownload.vue index 2ec67041..dc013a87 100644 --- a/ui/components/NewDownload.vue +++ b/ui/components/NewDownload.vue @@ -11,7 +11,7 @@
+ :disabled="!socket.isConnected || addInProgress" v-model="form.url">
@@ -29,7 +29,7 @@
@@ -63,7 +63,7 @@
@@ -85,7 +85,7 @@ Output Template
-
@@ -104,7 +104,7 @@ Command arguments for yt-dlp
-