/* * Vencord, a Discord client mod * Copyright (c) 2024 Vendicated and contributors * SPDX-License-Identifier: GPL-3.0-or-later */ import { closeModal, ModalCloseButton, ModalContent, ModalHeader, ModalProps, ModalRoot, ModalSize } from "@utils/modal"; import { Button, Text, useEffect, useState } from "@webpack/common"; export function DependencyModal({ props, options: { key, checkytdlp, checkffmpeg } }: { props: ModalProps; options: { key: string; checkytdlp: () => Promise; checkffmpeg: () => Promise; }; }) { const checking = Checking...; const installed = Installed!; const notInstalled = (color: string) => Not installed.; const [ytdlpStatus, setYtdlpStatus] = useState(checking); const [ffmpegStatus, setFfmpegStatus] = useState(checking); useEffect(() => { checkytdlp().then(v => v ? setYtdlpStatus(installed) : setYtdlpStatus(notInstalled("red"))); checkffmpeg().then(v => v ? setFfmpegStatus(installed) : setFfmpegStatus(notInstalled("yellow"))); }, []); return ( MediaDownloader: Missing dependencies closeModal(key)} />
The MediaDownloader plugin requires a working version of yt-dlp to be installed on your system. For extra features such as higher quality videos and gifs, you can also optionally install ffmpeg.

If you don't know how to install yt-dlp or ffmpeg, check the installation guides below (if you do know how to install it, make sure it's in your PATH).

Note: You may need to completely restart Discord after installing yt-dlp or ffmpeg for the plugin to detect them.

yt-dlp status: {ytdlpStatus}
ffmpeg status: {ffmpegStatus}
); }