Made it more clear the download is a live stream.

This commit is contained in:
ArabCoders 2024-01-14 14:35:07 +03:00
parent e54df357e0
commit b1f110d027
3 changed files with 25 additions and 6 deletions

View file

@ -152,11 +152,17 @@ class Download:
f'Invalid cookies: was provided for {self.info.title} - {str(e)}')
if self.is_live or self.is_manifestless:
log.debug(
f'Live stream or post manifestless mode detected, disabling options: {self.bad_live_options}')
hasDeletedOptions = False
deletedOpts: list = []
for opt in self.bad_live_options:
if opt in params:
del params[opt]
params.pop(opt, None)
hasDeletedOptions = True
deletedOpts.append(opt)
if hasDeletedOptions:
log.warning(
f'Live stream detected for [{self.info.title}], The following opts [{deletedOpts=}] have been deleted which are known to cause issues with live stream and post stream manifestless mode.')
log.info(
f'Downloading {os.getpid()=} id="{self.info.id}" title="{self.info.title}".')

View file

@ -327,6 +327,7 @@ const clearFailed = () => {
emits('deleteItem', 'completed', keys);
}
const setIcon = (item) => {
if (item.status === 'finished' && item.is_live) {
return 'fa-solid fa-globe';

View file

@ -53,10 +53,10 @@
<div class="column is-half-mobile has-text-centered">
<span class="icon-text">
<span class="icon" :class="{ 'has-text-success': item.status == 'downloading' }">
<font-awesome-icon
:icon="item.status == 'downloading' ? 'fa-solid fa-download' : 'fa-solid fa-spinner fa-spin'" />
<font-awesome-icon :icon="setIcon(item)" />
</span>
<span>{{ capitalize(item.status) }}</span>
<span v-if="item.status == 'downloading' && item.is_live">Streaming</span>
<span v-else>{{ capitalize(item.status) }}</span>
</span>
</div>
<div class="column is-half-mobile has-text-centered">
@ -157,6 +157,18 @@ const hasSelected = computed(() => selectedElms.value.length > 0)
const hasQueuedItems = computed(() => Object.keys(props.queue)?.length > 0)
const getTotal = computed(() => Object.keys(props.queue)?.length);
const setIcon = (item) => {
if (item.status === 'downloading' && item.is_live) {
return 'fa-solid fa-globe';
}
if (item.status === 'downloading') {
return 'fa-solid fa-circle-check';
}
return 'fa-solid fa-spinner fa-spin';
}
const ETAPipe = value => {
if (value === null || 0 === value) {
return 'Live';