# New downloads page for downloaded TV-Series

- Renamed downloads.tsx to index.tsx
- Added new downloads/series.tsx page
- Downloading now saves series primary image
- Downloads index page now shows series primary image with downloaded episode counter
- Updated EpisodeCard.tsx to display more information
- Moved season dropdown from SeasonPicker.tsx into its own component SeasonDropdown.tsx
- Updated navigation in DownloadItem.tsx to direct to series page when a downloaded episode is clicked
This commit is contained in:
herrrta
2024-11-30 13:35:10 -05:00
parent 3d8875208f
commit 7eb7d17fa9
11 changed files with 369 additions and 160 deletions

View File

@@ -14,6 +14,7 @@ import { useAtomValue } from "jotai";
import { useCallback } from "react";
import { toast } from "sonner-native";
import useImageStorage from "./useImageStorage";
import useDownloadHelper from "@/utils/download";
/**
* Custom hook for remuxing HLS to MP4 using FFmpeg.
@@ -28,6 +29,7 @@ export const useRemuxHlsToMp4 = () => {
const { saveDownloadedItemInfo, setProcesses } = useDownload();
const router = useRouter();
const { saveImage } = useImageStorage();
const { saveSeriesPrimaryImage } = useDownloadHelper();
const startRemuxing = useCallback(
async (item: BaseItemDto, url: string, mediaSource: MediaSourceInfo) => {
@@ -35,6 +37,7 @@ export const useRemuxHlsToMp4 = () => {
if (!api) throw new Error("API is not defined");
if (!item.Id) throw new Error("Item must have an Id");
await saveSeriesPrimaryImage(item);
const itemImage = getItemImage({
item,
api,