mirror of
https://github.com/younesaassila/ttv-lol-pro.git
synced 2025-04-29 22:14:27 +02:00
Fix dumb mistake
This commit is contained in:
parent
7c9ed15d74
commit
d87d42c993
@ -209,6 +209,7 @@ export function getFetch(options: FetchOptions): typeof fetch {
|
||||
|
||||
// Video Weaver requests.
|
||||
if (host != null && videoWeaverHostRegex.test(host)) {
|
||||
console.debug(`[TTV LOL PRO] 🥅 Caught Video Weaver request '${url}'.`);
|
||||
// TODO: Implement replacement limit if the ad is a preroll to avoid infinite loops.
|
||||
let videoWeaverUrl = url;
|
||||
if (replacementVideoWeaverUrls != null) {
|
||||
@ -278,6 +279,10 @@ export function getFetch(options: FetchOptions): typeof fetch {
|
||||
// Usher responses.
|
||||
if (host != null && usherHostRegex.test(host)) {
|
||||
responseBody = await readResponseBody();
|
||||
currentVideoWeaverUrls = responseBody
|
||||
.split("\n")
|
||||
.filter(line => videoWeaverUrlRegex.test(line));
|
||||
replacementVideoWeaverUrls = null;
|
||||
console.debug("[TTV LOL PRO] 🥅 Caught Usher response.");
|
||||
const videoWeaverUrls = responseBody
|
||||
.split("\n")
|
||||
@ -297,10 +302,7 @@ export function getFetch(options: FetchOptions): typeof fetch {
|
||||
// Video Weaver responses.
|
||||
if (host != null && videoWeaverHostRegex.test(host)) {
|
||||
responseBody = await readResponseBody();
|
||||
currentVideoWeaverUrls = responseBody
|
||||
.split("\n")
|
||||
.filter(line => videoWeaverUrlRegex.test(line));
|
||||
replacementVideoWeaverUrls = null;
|
||||
|
||||
// Check if response contains ad.
|
||||
if (responseBody.includes("stitched-ad")) {
|
||||
console.log(
|
||||
|
Loading…
x
Reference in New Issue
Block a user