Fix argument name in YTDLP options and enhance video cleanup on unmount
This commit is contained in:
parent
3219408a57
commit
6cbb8eea50
2 changed files with 11 additions and 1 deletions
|
|
@ -385,7 +385,7 @@ class DownloadQueue(metaclass=Singleton):
|
|||
"func": lambda _, msg: logs.append(msg),
|
||||
"level": logging.WARNING,
|
||||
},
|
||||
**YTDLPOpts.get_instance().preset(name=item.preset).add_cli(config=item.cli, from_user=True).get_all(),
|
||||
**YTDLPOpts.get_instance().preset(name=item.preset).add_cli(args=item.cli, from_user=True).get_all(),
|
||||
}
|
||||
|
||||
if item.cookies:
|
||||
|
|
|
|||
|
|
@ -154,6 +154,16 @@ onUnmounted(() => {
|
|||
if (title.value) {
|
||||
window.document.title = 'YTPTube'
|
||||
}
|
||||
if (video.value) {
|
||||
try {
|
||||
video.value.pause()
|
||||
video.value.querySelectorAll("source").forEach(source => source.removeAttribute("src"))
|
||||
video.value.load()
|
||||
}
|
||||
catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
const prepareVideoPlayer = () => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue