view_in_mpv: avoid creating --Frag files in ~/

These files created by yt-dlp are gonna spawn in the temp directory
instead.
This commit is contained in:
Simon Désaulniers 2025-12-18 18:06:58 -05:00
parent 5a0f01c7d8
commit e6abb8e1fd
1 changed files with 1 additions and 1 deletions

View File

@ -195,7 +195,7 @@ if [[ $USE_YTDLP_FOR_DOWNLOAD == "yes" ]]; then
MPV_FLAGS="$MPV_FLAGS --audio-file=$tmpdir/ytdlp_audio"
IFS=" " read -r -a video_command <<< "$MPV_COMMAND $MPV_FLAGS"
"${yt_dlp_video_command[@]}" -o - "$URL" | "${video_command[@]}" --title="$(yt-dlp --cookies-from-browser chromium:~/.local/share/qutebrowser --get-title "$URL") - mpv" "$@" -
( cd "$tmpdir" && "${yt_dlp_video_command[@]}" -o - "$URL" | "${video_command[@]}" --title="$(yt-dlp --cookies-from-browser chromium:~/.local/share/qutebrowser --get-title "$URL") - mpv" "$@" - )
ps $audio_ytdlp_pid >/dev/null && kill $audio_ytdlp_pid
rm -rf "$tmpdir"