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.

Update useSkipTime.ts

Pas 008f29f1 e6f06a5e

+12 -12
+12 -12
src/components/player/hooks/useSkipTime.ts
··· 8 8 import { getTurnstileToken } from "@/utils/turnstile"; 9 9 10 10 // Thanks Nemo for this API 11 - const THE_INTRO_DB_BASE_URL = "https://api.theintrodb.org"; 11 + const THE_INTRO_DB_BASE_URL = "https://api.theintrodb.org/v1"; 12 12 const FED_SKIPS_BASE_URL = "https://fed-skips.pstream.mov"; 13 13 // const VELORA_BASE_URL = "https://veloratv.ru/api/intro-end/confirmed"; 14 14 const INTRODB_BASE_URL = "https://api.introdb.app/intro"; ··· 31 31 if (!meta?.tmdbId) return null; 32 32 33 33 try { 34 - let apiUrl = `${THE_INTRO_DB_BASE_URL}?tmdb_id=${meta.tmdbId}`; 34 + let apiUrl = `${THE_INTRO_DB_BASE_URL}/intro?tmdb_id=${meta.tmdbId}`; 35 35 if ( 36 36 meta.type !== "movie" && 37 37 meta.season?.number && ··· 143 143 // Reset source 144 144 currentSkipTimeSource = null; 145 145 146 - // If user has febbox key, prioritize Fed-skips (better quality) 146 + // Try TheIntroDB API first (supports both movies and TV shows) 147 + const theIntroDBTime = await fetchTheIntroDBTime(); 148 + if (theIntroDBTime !== null) { 149 + currentSkipTimeSource = "theintrodb"; 150 + setSkiptime(theIntroDBTime); 151 + return; 152 + } 153 + 154 + // Fall back to Fed-skips if TheIntroDB doesn't have anything 147 155 // Note: Fed-skips only supports TV shows, not movies 148 156 if (febboxKey && meta?.type !== "movie") { 149 157 const fedSkipsTime = await fetchFedSkipsTime(); ··· 154 162 } 155 163 } 156 164 157 - // Try TheIntroDB API (supports both movies and TV shows) 158 - const theIntroDBTime = await fetchTheIntroDBTime(); 159 - if (theIntroDBTime !== null) { 160 - currentSkipTimeSource = "theintrodb"; 161 - setSkiptime(theIntroDBTime); 162 - return; 163 - } 164 - 165 - // Fall back to IntroDB API (TV shows only, available to all users) 165 + // Last resort: Fall back to IntroDB API (TV shows only, available to all users) 166 166 const introDBTime = await fetchIntroDBTime(); 167 167 if (introDBTime !== null) { 168 168 currentSkipTimeSource = "introdb";