Added maxWorkers to title
This commit is contained in:
parent
1bcad666be
commit
448a145ed0
3 changed files with 6 additions and 4 deletions
|
|
@ -159,6 +159,7 @@ class Config:
|
||||||
"url_prefix",
|
"url_prefix",
|
||||||
"remove_files",
|
"remove_files",
|
||||||
"ui_update_title",
|
"ui_update_title",
|
||||||
|
"max_workers",
|
||||||
)
|
)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|
|
||||||
|
|
@ -8,28 +8,28 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
const config = useConfigStore()
|
const config = useConfigStore()
|
||||||
const stateStore = useStateStore()
|
const stateStore = useStateStore()
|
||||||
|
const maxWorkers = config.app.max_workers
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (!config.app.ui_update_title) {
|
if (!config.app.ui_update_title) {
|
||||||
useHead({ title: 'YTPTube' })
|
useHead({ title: 'YTPTube' })
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
useHead({ title: `YTPTube: ( ${Object.keys(stateStore.queue).length || 0} | ${Object.keys(stateStore.history).length || 0} )` })
|
useHead({ title: `YTPTube: ( ${Object.keys(stateStore.queue).length || 0}/${maxWorkers} | ${Object.keys(stateStore.history).length || 0} )` })
|
||||||
})
|
})
|
||||||
|
|
||||||
watch(() => stateStore.history, () => {
|
watch(() => stateStore.history, () => {
|
||||||
if (!config.app.ui_update_title) {
|
if (!config.app.ui_update_title) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
useHead({ title: `YTPTube: ( ${Object.keys(stateStore.queue).length || 0} | ${Object.keys(stateStore.history).length || 0} )` })
|
useHead({ title: `YTPTube: ( ${Object.keys(stateStore.queue).length || 0}/${maxWorkers} | ${Object.keys(stateStore.history).length || 0} )` })
|
||||||
}, { deep: true })
|
}, { deep: true })
|
||||||
|
|
||||||
watch(() => stateStore.queue, () => {
|
watch(() => stateStore.queue, () => {
|
||||||
if (!config.app.ui_update_title) {
|
if (!config.app.ui_update_title) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
useHead({ title: `YTPTube: ( ${Object.keys(stateStore.queue).length || 0} | ${Object.keys(stateStore.history).length || 0} )` })
|
useHead({ title: `YTPTube: ( ${Object.keys(stateStore.queue).length || 0}/${maxWorkers} | ${Object.keys(stateStore.history).length || 0} )` })
|
||||||
}, { deep: true })
|
}, { deep: true })
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ const CONFIG_KEYS = {
|
||||||
ui_update_title: true,
|
ui_update_title: true,
|
||||||
output_template: '',
|
output_template: '',
|
||||||
ytdlp_version: '',
|
ytdlp_version: '',
|
||||||
|
max_workers: 1,
|
||||||
version: '',
|
version: '',
|
||||||
url_host: '',
|
url_host: '',
|
||||||
url_prefix: '',
|
url_prefix: '',
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue