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

10
FAQ.md
View file

@ -82,8 +82,18 @@ services:
Then simply create a new preset, and in the `Command options for yt-dlp` field set the following: 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"
--extractor-args "youtube:player-client=default,tv,mweb;formats=incomplete"
```
you and also enable the fallback by using the follow extractor args
```bash ```bash
--extractor-args "youtubepot-bgutilhttp:base_url=http://bgutil_provider:4416;disable_innertube=1" --extractor-args "youtubepot-bgutilhttp:base_url=http://bgutil_provider:4416;disable_innertube=1"
--extractor-args "youtube:player-client=default,tv,mweb;formats=incomplete" --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. 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', title: 'Confirm Action',
confirm: () => { }, confirm: () => { },
message: '', message: '',
options: [ options: [],
{ key: 'remove_history', label: 'Also, Remove from history.' },
],
}) })
const showThumbnails = computed(() => (props.thumbnails || true) && !hideThumbnail.value) const showThumbnails = computed(() => (props.thumbnails || true) && !hideThumbnail.value)
@ -735,6 +733,7 @@ const addArchiveDialog = (item: StoreItem) => {
dialog_confirm.value.visible = true dialog_confirm.value.visible = true
dialog_confirm.value.title = 'Archive Item' dialog_confirm.value.title = 'Archive Item'
dialog_confirm.value.message = `Archive '${item.title || item.id || item.url || '??'}'?` 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) 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.visible = true
dialog_confirm.value.title = 'Remove from Archive' dialog_confirm.value.title = 'Remove from Archive'
dialog_confirm.value.message = `Remove '${item.title || item.id || item.url || '??'}' 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 { try {
const req = await request(`/api/archive/${item._id}`, { const req = await request(`/api/archive/${item._id}`, {
credentials: 'include', credentials: 'include',
@ -876,15 +880,21 @@ const removeFromArchive = async (item: StoreItem, opts?: { remove_history?: bool
const data = await req.json() const data = await req.json()
if (!req.ok) { if (!req.ok) {
toast.error(data.error) 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) { } catch (e: any) {
console.error(e) console.error(e)
toast.error(`Error: ${e.message}`) toast.error(`Error: ${e.message}`)
} finally { } finally {
dialog_confirm.value.visible = false dialog_confirm.value.visible = false
} }
if (opts?.re_add) {
retryItem(item, true)
return
}
if (opts?.remove_history) { if (opts?.remove_history) {
socket.emit('item_delete', { id: item._id, remove_file: false }) socket.emit('item_delete', { id: item._id, remove_file: false })
} }