pstream is dead; long live pstream taciturnaxolotl.github.io/pstream-ng/
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix random errors

Pas b927c697 8b115ebb

+56 -10
+1 -1
index.html
··· 38 38 <meta name="msapplication-TileColor" content="#120f1d" /> 39 39 <meta name="theme-color" content="#000000" /> 40 40 41 - <meta name="apple-mobile-web-app-capable" content="yes" /> 41 + <meta name="mobile-web-app-capable" content="yes" /> 42 42 <meta 43 43 name="apple-mobile-web-app-status-bar-style" 44 44 content="black-translucent"
+14 -3
src/backend/metadata/traktFunctions.ts
··· 7 7 pageSize: number = 20, 8 8 contentType: "movie" | "tv" | "both" = "both", 9 9 ): PaginatedTraktResponse { 10 + if (!results) { 11 + return { 12 + tmdb_ids: [], 13 + hasMore: false, 14 + totalCount: 0, 15 + }; 16 + } 17 + 10 18 let tmdbIds: number[]; 11 19 12 20 if (contentType === "movie") { 13 - tmdbIds = results.movie_tmdb_ids; 21 + tmdbIds = results.movie_tmdb_ids || []; 14 22 } else if (contentType === "tv") { 15 - tmdbIds = results.tv_tmdb_ids; 23 + tmdbIds = results.tv_tmdb_ids || []; 16 24 } else { 17 25 // For 'both', combine movies and TV shows 18 - tmdbIds = [...results.movie_tmdb_ids, ...results.tv_tmdb_ids]; 26 + tmdbIds = [ 27 + ...(results.movie_tmdb_ids || []), 28 + ...(results.tv_tmdb_ids || []), 29 + ]; 19 30 } 20 31 21 32 const startIndex = (page - 1) * pageSize;
+15 -2
src/index.tsx
··· 155 155 function TheRouter(props: { children: ReactNode }) { 156 156 const normalRouter = conf().NORMAL_ROUTER; 157 157 158 - if (normalRouter) return <BrowserRouter>{props.children}</BrowserRouter>; 159 - return <HashRouter>{props.children}</HashRouter>; 158 + if (normalRouter) 159 + return ( 160 + <BrowserRouter 161 + future={{ v7_startTransition: true, v7_relativeSplatPath: true }} 162 + > 163 + {props.children} 164 + </BrowserRouter> 165 + ); 166 + return ( 167 + <HashRouter 168 + future={{ v7_startTransition: true, v7_relativeSplatPath: true }} 169 + > 170 + {props.children} 171 + </HashRouter> 172 + ); 160 173 } 161 174 162 175 // Checks if the extension is installed
+14
src/pages/discover/hooks/useDiscoverMedia.ts
··· 184 184 // Race between the Trakt request and timeout 185 185 const response = await Promise.race([traktFunction(), timeoutPromise]); 186 186 187 + // Check if response is null 188 + if (!response) { 189 + throw new Error("Trakt API returned null response"); 190 + } 191 + 187 192 // Paginate the results 188 193 const pageSize = isCarouselView ? 20 : 100; // Limit to 20 items for carousels, get more for detailed views 189 194 const { tmdb_ids: tmdbIds, hasMore: hasMoreResults } = paginateResults( ··· 317 322 }, [mediaType, formattedLanguage, isCarouselView]); 318 323 319 324 const fetchMedia = useCallback(async () => { 325 + // Skip fetching recommendations if no ID is provided 326 + if (contentType === "recommendations" && !id) { 327 + setIsLoading(false); 328 + setMedia([]); 329 + setHasMore(false); 330 + setSectionTitle(""); 331 + return; 332 + } 333 + 320 334 setIsLoading(true); 321 335 setError(null); 322 336
+1
src/pages/parts/home/HeroPart.tsx
··· 94 94 paddingTop: `${topOffset}px`, 95 95 }} 96 96 onFixedToggle={stickStateChanged} 97 + scrollElement="window" 97 98 > 98 99 <SearchBarInput 99 100 ref={inputRef}
+11 -4
src/setup/chromecast.ts
··· 32 32 const context = ( 33 33 window as any 34 34 ).cast.framework.CastContext.getInstance(); 35 - context.setOptions({ 35 + const options: any = { 36 36 receiverApplicationId: (window as any).chrome?.cast?.media 37 37 ?.DEFAULT_MEDIA_RECEIVER_APP_ID, 38 - autoJoinPolicy: (window as any).cast.framework.AutoJoinPolicy 39 - .ORIGIN_SCOPED, 40 - }); 38 + }; 39 + 40 + // Only set autoJoinPolicy if AutoJoinPolicy exists 41 + if ((window as any).cast.framework.AutoJoinPolicy?.ORIGIN_SCOPED) { 42 + options.autoJoinPolicy = ( 43 + window as any 44 + ).cast.framework.AutoJoinPolicy.ORIGIN_SCOPED; 45 + } 46 + 47 + context.setOptions(options); 41 48 } 42 49 } catch (e) { 43 50 console.warn("Chromecast initialization error:", e);