fix: typo

This commit is contained in:
Adrian Castro
2024-03-27 14:59:44 +01:00
parent dca49e8563
commit 020cb42e38
2 changed files with 4 additions and 4 deletions

View File

@@ -75,7 +75,7 @@ export const VideoPlayer = () => {
const setMeta = usePlayerStore((state) => state.setMeta); const setMeta = usePlayerStore((state) => state.setMeta);
const { gestureControls, autoPlay } = usePlayerSettingsStore(); const { gestureControls, autoPlay } = usePlayerSettingsStore();
const { updateWatchHistory, removeFromWatchHistory, getWatchHistorItem } = const { updateWatchHistory, removeFromWatchHistory, getWatchHistoryItem } =
useWatchHistoryStore(); useWatchHistoryStore();
const updateResizeMode = (newMode: ResizeMode) => { const updateResizeMode = (newMode: ResizeMode) => {
@@ -242,7 +242,7 @@ export const VideoPlayer = () => {
if (meta) { if (meta) {
const media = convertMetaToScrapeMedia(meta); const media = convertMetaToScrapeMedia(meta);
const watchHistoryItem = getWatchHistorItem(media); const watchHistoryItem = getWatchHistoryItem(media);
if (watchHistoryItem) { if (watchHistoryItem) {
void videoRef.setPositionAsync(watchHistoryItem.positionMillis); void videoRef.setPositionAsync(watchHistoryItem.positionMillis);

View File

@@ -142,7 +142,7 @@ interface WatchHistoryItem {
interface WatchHistoryStoreState { interface WatchHistoryStoreState {
watchHistory: WatchHistoryItem[]; watchHistory: WatchHistoryItem[];
hasWatchHistoryItem: (item: ItemData) => boolean; hasWatchHistoryItem: (item: ItemData) => boolean;
getWatchHistorItem: (media: ScrapeMedia) => WatchHistoryItem | undefined; getWatchHistoryItem: (media: ScrapeMedia) => WatchHistoryItem | undefined;
setWatchHistory: (watchHistory: WatchHistoryItem[]) => void; setWatchHistory: (watchHistory: WatchHistoryItem[]) => void;
updateWatchHistory: ( updateWatchHistory: (
item: ItemData, item: ItemData,
@@ -165,7 +165,7 @@ export const useWatchHistoryStore = create<
(historyItem) => historyItem.item.id === item.id, (historyItem) => historyItem.item.id === item.id,
), ),
), ),
getWatchHistorItem: (media: ScrapeMedia) => getWatchHistoryItem: (media: ScrapeMedia) =>
get().watchHistory.find((historyItem) => { get().watchHistory.find((historyItem) => {
if (historyItem.media.type === "movie" && media.type === "movie") { if (historyItem.media.type === "movie" && media.type === "movie") {
return historyItem.media.tmdbId === media.tmdbId; return historyItem.media.tmdbId === media.tmdbId;