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.

use cia api for status check

Pas b1376694 0a6c162b

+14 -44
+3 -3
src/assets/locales/en.json
··· 1092 1092 }, 1093 1093 "fedapi": { 1094 1094 "onboarding": { 1095 - "title": "FED API (Private) token", 1096 - "description": "Bring your own FREE Febbox account to gain access to FED API (Private), the best source with 4K quality, Dolby Atmos, skip intro and the fastest load times! Highly recommended option!" 1095 + "title": "Febbox token", 1096 + "description": "Bring your own FREE Febbox account to gain access to exclusive sources! The best sources with 4K quality, Dolby Atmos, skip intro and the fastest load times! Highly recommended option!" 1097 1097 }, 1098 1098 "setup": { 1099 1099 "title": "To get your UI token:", ··· 1110 1110 }, 1111 1111 "status": { 1112 1112 "success": "success", 1113 - "api_down": "Cannot reach FED API!", 1113 + "api_down": "Cannot reach an API!", 1114 1114 "invalid_token": "Failed to fetch a 'VIP' stream. Your token is invalid!" 1115 1115 } 1116 1116 },
+11 -41
src/pages/parts/settings/SetupPart.tsx
··· 20 20 import { useAuthStore } from "@/stores/auth"; 21 21 import { usePreferencesStore } from "@/stores/preferences"; 22 22 23 - const getRegion = async (): Promise<string | null> => { 24 - if (typeof window === "undefined") return null; 25 - try { 26 - const regionData = window.localStorage.getItem("__MW::region"); 27 - if (!regionData) return null; 28 - const parsed = JSON.parse(regionData); 29 - return parsed?.state?.region || null; 30 - } catch { 31 - return null; 32 - } 33 - }; 34 - 35 - const getBaseUrl = async (): Promise<string> => { 36 - const region = await getRegion(); 37 - switch (region) { 38 - case "us-east": 39 - return "https://fed-api-east.pstream.org"; 40 - case "us-west": 41 - return "https://fed-api-west.pstream.org"; 42 - case "south": 43 - return "https://fed-api-south.pstream.org"; 44 - case "asia": 45 - return "https://fed-api-asia.pstream.mov"; 46 - case "europe": 47 - return "https://fed-api-europe.pstream.org"; 48 - case "unknown": 49 - return "https://fed-api-east.pstream.org"; 50 - default: 51 - return ""; 52 - } 53 - }; 54 - 55 23 const testUrl = "https://postman-echo.com/get"; 56 24 57 25 const sleep = (ms: number): Promise<void> => { ··· 90 58 } 91 59 92 60 export async function testFebboxKey(febboxKey: string | null): Promise<Status> { 93 - const BASE_URL = await getBaseUrl(); 94 - const febboxApiTestUrl = `${BASE_URL}/movie/tt13654226`; 61 + const BASE_URL = "https://febbox.andresdev.org"; 62 + const febboxApiTestUrl = `${BASE_URL}/movie/950396`; 95 63 96 64 if (!febboxKey) { 97 65 return "unset"; ··· 127 95 } 128 96 129 97 const data = (await response.json()) as any; 130 - if (!data || !data.streams) { 98 + if (!data || !data.sources) { 131 99 console.error("Invalid response format from Febbox API:", data); 132 100 attempts += 1; 133 101 if (attempts === maxAttempts) { ··· 139 107 continue; 140 108 } 141 109 142 - const isVIPLink = Object.values(data.streams).some((link: any) => { 143 - if (typeof link === "string") { 144 - return link.toLowerCase().includes("vip"); 145 - } 146 - return false; 147 - }); 110 + const isVIPLink = 111 + Array.isArray(data.sources) && 112 + data.sources.some((source: any) => { 113 + if (typeof source?.file === "string") { 114 + return source.file.toLowerCase().includes("vip"); 115 + } 116 + return false; 117 + }); 148 118 149 119 if (isVIPLink) { 150 120 console.log("VIP link found, returning success");