mirror of
https://github.com/younesaassila/ttv-lol-pro.git
synced 2025-05-02 23:44:26 +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.
|
// Video Weaver requests.
|
||||||
if (host != null && videoWeaverHostRegex.test(host)) {
|
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.
|
// TODO: Implement replacement limit if the ad is a preroll to avoid infinite loops.
|
||||||
let videoWeaverUrl = url;
|
let videoWeaverUrl = url;
|
||||||
if (replacementVideoWeaverUrls != null) {
|
if (replacementVideoWeaverUrls != null) {
|
||||||
@ -278,6 +279,10 @@ export function getFetch(options: FetchOptions): typeof fetch {
|
|||||||
// Usher responses.
|
// Usher responses.
|
||||||
if (host != null && usherHostRegex.test(host)) {
|
if (host != null && usherHostRegex.test(host)) {
|
||||||
responseBody = await readResponseBody();
|
responseBody = await readResponseBody();
|
||||||
|
currentVideoWeaverUrls = responseBody
|
||||||
|
.split("\n")
|
||||||
|
.filter(line => videoWeaverUrlRegex.test(line));
|
||||||
|
replacementVideoWeaverUrls = null;
|
||||||
console.debug("[TTV LOL PRO] 🥅 Caught Usher response.");
|
console.debug("[TTV LOL PRO] 🥅 Caught Usher response.");
|
||||||
const videoWeaverUrls = responseBody
|
const videoWeaverUrls = responseBody
|
||||||
.split("\n")
|
.split("\n")
|
||||||
@ -297,10 +302,7 @@ export function getFetch(options: FetchOptions): typeof fetch {
|
|||||||
// Video Weaver responses.
|
// Video Weaver responses.
|
||||||
if (host != null && videoWeaverHostRegex.test(host)) {
|
if (host != null && videoWeaverHostRegex.test(host)) {
|
||||||
responseBody = await readResponseBody();
|
responseBody = await readResponseBody();
|
||||||
currentVideoWeaverUrls = responseBody
|
|
||||||
.split("\n")
|
|
||||||
.filter(line => videoWeaverUrlRegex.test(line));
|
|
||||||
replacementVideoWeaverUrls = null;
|
|
||||||
// Check if response contains ad.
|
// Check if response contains ad.
|
||||||
if (responseBody.includes("stitched-ad")) {
|
if (responseBody.includes("stitched-ad")) {
|
||||||
console.log(
|
console.log(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user