diff --git a/app/(auth)/(tabs)/(home)/index.tsx b/app/(auth)/(tabs)/(home)/index.tsx index c6d88470..f2f69853 100644 --- a/app/(auth)/(tabs)/(home)/index.tsx +++ b/app/(auth)/(tabs)/(home)/index.tsx @@ -75,14 +75,6 @@ export default function index() { const insets = useSafeAreaInsets(); - useEffect(() => { - const interval = setInterval(async () => { - await refreshStreamyfinPluginSettings(); - }, 60 * 10 * 1000); // 10 min - - return () => clearInterval(interval); - }, []); - useEffect(() => { const hasDownloads = downloadedFiles && downloadedFiles.length > 0; navigation.setOptions({ diff --git a/providers/JellyfinProvider.tsx b/providers/JellyfinProvider.tsx index 4455dfe1..9bb19cd4 100644 --- a/providers/JellyfinProvider.tsx +++ b/providers/JellyfinProvider.tsx @@ -174,6 +174,17 @@ export const JellyfinProvider: React.FC<{ children: ReactNode }> = ({ useInterval(pollQuickConnect, isPolling ? 1000 : null); + useInterval(refreshStreamyfinPluginSettings, 60 * 5 * 1000); // 5 min + + /************* ✨ Codeium Command ⭐ *************/ + /** + * Discovers and retrieves a list of recommended Jellyfin server candidates based on the provided URL. + * + * @param url - The URL used to discover server candidates. + * @returns A promise that resolves to an array of servers with their addresses. + */ + + /****** c70f9dcb-e9fa-4929-8ff2-39aba2e996c8 *******/ const discoverServers = async (url: string): Promise => { const servers = await jellyfin?.discovery.getRecommendedServerCandidates( url