Fixed Skip button not displaying

when jellyfin context root/path is set (#165)
This commit is contained in:
Cloud9Developer 2024-05-16 12:23:35 -05:00 committed by GitHub
parent fa22495be7
commit 0577126cb8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -24,7 +24,16 @@ introSkipper.d = function (msg) {
if (!path.includes("/PlaybackInfo")) { return response; } if (!path.includes("/PlaybackInfo")) { return response; }
introSkipper.d("Retrieving skip segments from URL"); introSkipper.d("Retrieving skip segments from URL");
introSkipper.d(path); introSkipper.d(path);
let id = path.split("/")[2];
// Check for context root and set id accordingly
let path_arr = path.split("/");
let id = "";
if (path_arr[1] == "Items") {
id = path_arr[2];
} else {
id = path_arr[3];
}
introSkipper.skipSegments = await introSkipper.secureFetch(`Episode/${id}/IntroSkipperSegments`); introSkipper.skipSegments = await introSkipper.secureFetch(`Episode/${id}/IntroSkipperSegments`);
introSkipper.d("Successfully retrieved skip segments"); introSkipper.d("Successfully retrieved skip segments");
introSkipper.d(introSkipper.skipSegments); introSkipper.d(introSkipper.skipSegments);