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",
|
||||
"remove_files",
|
||||
"ui_update_title",
|
||||
"max_workers",
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
|
|
|
|||
|
|
@ -8,28 +8,28 @@
|
|||
<script setup>
|
||||
const config = useConfigStore()
|
||||
const stateStore = useStateStore()
|
||||
const maxWorkers = config.app.max_workers
|
||||
|
||||
onMounted(() => {
|
||||
if (!config.app.ui_update_title) {
|
||||
useHead({ title: 'YTPTube' })
|
||||
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, () => {
|
||||
if (!config.app.ui_update_title) {
|
||||
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 })
|
||||
|
||||
watch(() => stateStore.queue, () => {
|
||||
if (!config.app.ui_update_title) {
|
||||
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 })
|
||||
|
||||
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ const CONFIG_KEYS = {
|
|||
ui_update_title: true,
|
||||
output_template: '',
|
||||
ytdlp_version: '',
|
||||
max_workers: 1,
|
||||
version: '',
|
||||
url_host: '',
|
||||
url_prefix: '',
|
||||
|
|
|
|||
Loading…
Reference in a new issue