# 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

@@ -19,7 +19,7 @@ import {
BaseItemDto,
MediaSourceInfo,
} from "@jellyfin/sdk/lib/generated-client/models";
import { router, useFocusEffect } from "expo-router";
import {Href, router, useFocusEffect} from "expo-router";
import { useAtom } from "jotai";
import { useCallback, useMemo, useRef, useState } from "react";
import { Alert, TouchableOpacity, View, ViewProps } from "react-native";
@@ -206,7 +206,16 @@ export const DownloadItem: React.FC<DownloadProps> = ({ item, ...props }) => {
) : isDownloaded ? (
<TouchableOpacity
onPress={() => {
router.push("/downloads");
router.push(
item.Type !== "Episode"
? "/downloads"
: {
pathname: `/downloads/${item.SeriesId}`,
params: {
episodeSeasonIndex: item.ParentIndexNumber
}
} as Href
);
}}
>
<Ionicons name="cloud-download" size={26} color="#9333ea" />