mirror of
https://github.com/p-stream/p-stream.git
synced 2026-01-11 20:10:32 +00:00
Update useSkipTime.ts
This commit is contained in:
parent
169d1be8ab
commit
d48f9ed513
1 changed files with 1 additions and 7 deletions
|
|
@ -90,13 +90,7 @@ export function useSkipTime() {
|
||||||
try {
|
try {
|
||||||
const apiUrl = `${INTRODB_BASE_URL}?imdb_id=${meta.imdbId}&season=${meta.season?.number}&episode=${meta.episode?.number}`;
|
const apiUrl = `${INTRODB_BASE_URL}?imdb_id=${meta.imdbId}&season=${meta.season?.number}&episode=${meta.episode?.number}`;
|
||||||
|
|
||||||
const response = await proxiedFetch(apiUrl);
|
const data = await proxiedFetch(apiUrl);
|
||||||
|
|
||||||
if (!response.ok) {
|
|
||||||
throw new Error("IntroDB API request failed");
|
|
||||||
}
|
|
||||||
|
|
||||||
const data = await response.json();
|
|
||||||
|
|
||||||
if (data && typeof data.end_ms === "number") {
|
if (data && typeof data.end_ms === "number") {
|
||||||
// Convert milliseconds to seconds
|
// Convert milliseconds to seconds
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue