diff --git a/.github/workflows/ci-codeql.yml b/.github/workflows/ci-codeql.yml index 3e2a0cea..763728ce 100644 --- a/.github/workflows/ci-codeql.yml +++ b/.github/workflows/ci-codeql.yml @@ -31,13 +31,13 @@ jobs: fetch-depth: 0 - name: ๐Ÿ Initialize CodeQL - uses: github/codeql-action/init@3c3833e0f8c1c83d449a7478aa59c036a9165498 # v3.29.11 + uses: github/codeql-action/init@2d92b76c45b91eb80fc44c74ce3fce0ee94e8f9d # v3.30.0 with: languages: ${{ matrix.language }} queries: +security-extended,security-and-quality - name: ๐Ÿ› ๏ธ Autobuild - uses: github/codeql-action/autobuild@3c3833e0f8c1c83d449a7478aa59c036a9165498 # v3.29.11 + uses: github/codeql-action/autobuild@2d92b76c45b91eb80fc44c74ce3fce0ee94e8f9d # v3.30.0 - name: ๐Ÿงช Perform CodeQL Analysis - uses: github/codeql-action/analyze@3c3833e0f8c1c83d449a7478aa59c036a9165498 # v3.29.11 + uses: github/codeql-action/analyze@2d92b76c45b91eb80fc44c74ce3fce0ee94e8f9d # v3.30.0 diff --git a/components/list/ListItem.tsx b/components/list/ListItem.tsx index f0880752..7ce33986 100644 --- a/components/list/ListItem.tsx +++ b/components/list/ListItem.tsx @@ -34,7 +34,7 @@ export const ListItem: React.FC> = ({ > = ({ ); return ( {subtitle && ( - + {subtitle} )} diff --git a/components/series/SeasonPicker.tsx b/components/series/SeasonPicker.tsx index f617ae8b..d5ae57a9 100644 --- a/components/series/SeasonPicker.tsx +++ b/components/series/SeasonPicker.tsx @@ -98,10 +98,6 @@ export const SeasonPicker: React.FC = ({ item }) => { return res.data.Items; }, - select: (data) => - [...(data || [])].sort( - (a, b) => (a.IndexNumber ?? 0) - (b.IndexNumber ?? 0), - ), enabled: !!api && !!user?.Id && !!item.Id && !!selectedSeasonId, }); diff --git a/components/settings/HomeIndex.tsx b/components/settings/HomeIndex.tsx index 79243147..5278c17f 100644 --- a/components/settings/HomeIndex.tsx +++ b/components/settings/HomeIndex.tsx @@ -11,7 +11,6 @@ import { getUserLibraryApi, getUserViewsApi, } from "@jellyfin/sdk/lib/utils/api"; -import NetInfo from "@react-native-community/netinfo"; import { type QueryFunction, useQuery } from "@tanstack/react-query"; import { useNavigation, useRouter, useSegments } from "expo-router"; import { useAtomValue } from "jotai"; @@ -33,6 +32,7 @@ import { ScrollingCollectionList } from "@/components/home/ScrollingCollectionLi import { Loader } from "@/components/Loader"; import { MediaListSection } from "@/components/medialists/MediaListSection"; import { Colors } from "@/constants/Colors"; +import { useNetworkStatus } from "@/hooks/useNetworkStatus"; import { useInvalidatePlaybackProgressCache } from "@/hooks/useRevalidatePlaybackProgressCache"; import { useDownload } from "@/providers/DownloadProvider"; import { apiAtom, userAtom } from "@/providers/JellyfinProvider"; @@ -72,9 +72,6 @@ export const HomeIndex = () => { refreshStreamyfinPluginSettings, ] = useSettings(null); - const [isConnected, setIsConnected] = useState(null); - const [loadingRetry, setLoadingRetry] = useState(false); - const navigation = useNavigation(); const insets = useSafeAreaInsets(); @@ -83,6 +80,7 @@ export const HomeIndex = () => { const { getDownloadedItems, cleanCacheDirectory } = useDownload(); const prevIsConnected = useRef(false); + const { isConnected, loading: retryLoading, retryCheck } = useNetworkStatus(); const invalidateCache = useInvalidatePlaybackProgressCache(); useEffect(() => { // Only invalidate cache when transitioning from offline to online @@ -137,29 +135,6 @@ export const HomeIndex = () => { }; }, [segments]); - const checkConnection = useCallback(async () => { - setLoadingRetry(true); - const state = await NetInfo.fetch(); - setIsConnected(state.isConnected); - setLoadingRetry(false); - }, []); - - useEffect(() => { - const unsubscribe = NetInfo.addEventListener((state) => { - if (state.isConnected === false || state.isInternetReachable === false) - setIsConnected(false); - else setIsConnected(true); - }); - - NetInfo.fetch().then((state) => { - setIsConnected(state.isConnected); - }); - - return () => { - unsubscribe(); - }; - }, []); - const { data, isError: e1, @@ -341,7 +316,7 @@ export const HomeIndex = () => { for (const [index, section] of settings.home.sections.entries()) { const id = section.items?.title || `section-${index}`; ss.push({ - title: id, + title: t(`${id}`), queryKey: ["home", id], queryFn: async () => { if (section.items) { @@ -397,30 +372,30 @@ export const HomeIndex = () => { {t("home.no_internet_message")} - + {!Platform.isTV && ( + + )}