minor history fix

This commit is contained in:
arabcoders 2025-08-09 18:32:51 +03:00
parent ec72c76b9c
commit 7551aa1fd4
3 changed files with 31 additions and 9 deletions

View file

@ -20,6 +20,7 @@
"attl",
"autonumber",
"bgutil",
"bgutilhttp",
"brainicism",
"brotlicffi",
"consoletitle",
@ -113,7 +114,8 @@
"vconvert",
"writedescription",
"xerror",
"youtu"
"youtu",
"youtubepot"
],
"css.styleSheets": [
"ui/app/assets/css/*.css"

12
FAQ.md
View file

@ -83,7 +83,17 @@ services:
Then simply create a new preset, and in the `Command options for yt-dlp` field set the following:
```bash
--extractor-args "youtubepot-bgutilhttp:base_url=http://bgutil_provider:4416;disable_innertube=1"
--extractor-args "youtubepot-bgutilhttp:base_url=http://bgutil_provider:4416"
--extractor-args "youtube:player-client=default,tv,mweb;formats=incomplete"
```
you and also enable the fallback by using the follow extractor args
```bash
--extractor-args "youtubepot-bgutilhttp:base_url=http://bgutil_provider:4416;disable_innertube=1"
--extractor-args "youtube:player-client=default,tv,mweb;formats=incomplete"
```
Use this settings in case the extractor fails to get the pot tokens from the bgutil provider server.
For more information please visit [bgutil-ytdlp-pot-provider](https://github.com/Brainicism/bgutil-ytdlp-pot-provider) project.

View file

@ -508,9 +508,7 @@ const dialog_confirm = ref<{
title: 'Confirm Action',
confirm: () => { },
message: '',
options: [
{ key: 'remove_history', label: 'Also, Remove from history.' },
],
options: [],
})
const showThumbnails = computed(() => (props.thumbnails || true) && !hideThumbnail.value)
@ -735,6 +733,7 @@ const addArchiveDialog = (item: StoreItem) => {
dialog_confirm.value.visible = true
dialog_confirm.value.title = 'Archive Item'
dialog_confirm.value.message = `Archive '${item.title || item.id || item.url || '??'}'?`
dialog_confirm.value.options = [{ key: 'remove_history', label: 'Also, Remove from history.' }]
dialog_confirm.value.confirm = (opts: any) => archiveItem(item, opts)
}
@ -864,10 +863,15 @@ const removeFromArchiveDialog = (item: StoreItem) => {
dialog_confirm.value.visible = true
dialog_confirm.value.title = 'Remove from Archive'
dialog_confirm.value.message = `Remove '${item.title || item.id || item.url || '??'}' from archive?`
dialog_confirm.value.confirm = () => removeFromArchive(item)
dialog_confirm.value.options = [
{ key: 'remove_history', label: 'Also, Remove from history.' },
{ key: 're_add', label: 'Re-add to download form.' },
]
dialog_confirm.value.confirm = (opts: any) => removeFromArchive(item, opts)
}
const removeFromArchive = async (item: StoreItem, opts?: { remove_history?: boolean }) => {
const removeFromArchive = async (item: StoreItem, opts?: { re_add?: boolean, remove_history?: boolean }) => {
console.log('Removing from archive:', item, opts)
try {
const req = await request(`/api/archive/${item._id}`, {
credentials: 'include',
@ -876,15 +880,21 @@ const removeFromArchive = async (item: StoreItem, opts?: { remove_history?: bool
const data = await req.json()
if (!req.ok) {
toast.error(data.error)
return
} else {
toast.success(data.message || `Removed '${item.title || item.id || item.url || '??'}' from archive.`)
}
toast.success(data.message || `Removed '${item.title || item.id || item.url || '??'}' from archive.`)
} catch (e: any) {
console.error(e)
toast.error(`Error: ${e.message}`)
} finally {
dialog_confirm.value.visible = false
}
if (opts?.re_add) {
retryItem(item, true)
return
}
if (opts?.remove_history) {
socket.emit('item_delete', { id: item._id, remove_file: false })
}