mirror of
https://github.com/sussy-code/smov.git
synced 2024-12-21 14:47:41 +01:00
Add support for playlist download
This commit is contained in:
parent
7145469165
commit
ac0e5e6927
1 changed files with 4 additions and 4 deletions
|
@ -37,6 +37,8 @@ export function SettingsMenu({ id }: { id: string }) {
|
||||||
|
|
||||||
const source = usePlayerStore((s) => s.source);
|
const source = usePlayerStore((s) => s.source);
|
||||||
|
|
||||||
|
const downloadable = source?.type === "file" || source?.type === "hls";
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Menu.Card>
|
<Menu.Card>
|
||||||
<Menu.SectionTitle>
|
<Menu.SectionTitle>
|
||||||
|
@ -58,12 +60,10 @@ export function SettingsMenu({ id }: { id: string }) {
|
||||||
<Menu.Link
|
<Menu.Link
|
||||||
clickable
|
clickable
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
router.navigate(
|
router.navigate(downloadable ? "/download" : "/download/unable")
|
||||||
source?.type === "file" ? "/download" : "/download/unable",
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
rightSide={<Icon className="text-xl" icon={Icons.DOWNLOAD} />}
|
rightSide={<Icon className="text-xl" icon={Icons.DOWNLOAD} />}
|
||||||
className={source?.type === "file" ? "opacity-100" : "opacity-50"}
|
className={downloadable ? "opacity-100" : "opacity-50"}
|
||||||
>
|
>
|
||||||
{t("player.menus.settings.downloadItem")}
|
{t("player.menus.settings.downloadItem")}
|
||||||
</Menu.Link>
|
</Menu.Link>
|
||||||
|
|
Loading…
Reference in a new issue