feat: enhance PlayScreen and VideoCard with improved video loading and app state handling; update player store for better episode management

This commit is contained in:
zimplexing
2025-07-16 21:26:37 +08:00
parent daba164998
commit e0aa40eea0
7 changed files with 88 additions and 41 deletions

View File

@@ -34,11 +34,10 @@ export default function VideoCard({
sourceName,
progress,
episodeIndex,
totalEpisodes,
onFocus,
onRecordDeleted,
api,
playTime,
playTime = 0,
}: VideoCardProps) {
const router = useRouter();
const [isFocused, setIsFocused] = useState(false);
@@ -62,7 +61,7 @@ export default function VideoCard({
if (progress !== undefined && episodeIndex !== undefined) {
router.push({
pathname: "/play",
params: { source, id, episodeIndex, position: playTime },
params: { source, id, episodeIndex: episodeIndex - 1, title, position: playTime * 1000 },
});
} else {
router.push({