mirror of
https://github.com/sussy-code/smov.git
synced 2025-01-01 16:37:39 +01:00
fix episodes not redirecting properly
This commit is contained in:
parent
e57d4578a2
commit
851bbb2203
1 changed files with 5 additions and 1 deletions
|
@ -181,6 +181,10 @@ export async function convertLegacyUrl(
|
||||||
|
|
||||||
const urlParts = url.split("/").slice(2);
|
const urlParts = url.split("/").slice(2);
|
||||||
const [, type, id] = urlParts[0].split("-", 3);
|
const [, type, id] = urlParts[0].split("-", 3);
|
||||||
|
const suffix = urlParts
|
||||||
|
.slice(1)
|
||||||
|
.map((v) => `/${v}`)
|
||||||
|
.join("");
|
||||||
|
|
||||||
if (isLegacyMediaType(url)) {
|
if (isLegacyMediaType(url)) {
|
||||||
const details = await getMediaDetails(id, TMDBContentTypes.TV);
|
const details = await getMediaDetails(id, TMDBContentTypes.TV);
|
||||||
|
@ -188,7 +192,7 @@ export async function convertLegacyUrl(
|
||||||
MWMediaType.SERIES,
|
MWMediaType.SERIES,
|
||||||
details.id.toString(),
|
details.id.toString(),
|
||||||
details.name
|
details.name
|
||||||
)}`;
|
)}${suffix}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
const mediaType = TMDBMediaToMediaType(type as TMDBContentTypes);
|
const mediaType = TMDBMediaToMediaType(type as TMDBContentTypes);
|
||||||
|
|
Loading…
Reference in a new issue