oSumAtrIX 3a17bbe514 fix(twitch/block-embedded-ads): rewrite Kotlin classes to Java (#270)
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-01-02 08:55:19 +01:00

27 lines
624 B
Java

package app.revanced.twitch.adblock;
import okhttp3.Request;
public interface IAdblockService {
String friendlyName();
Integer maxAttempts();
Boolean isAvailable();
Request rewriteHlsRequest(Request originalRequest);
static boolean isVod(Request request){
return request.url().pathSegments().contains("vod");
}
static String channelName(Request request) {
for (String pathSegment : request.url().pathSegments()) {
if (pathSegment.endsWith(".m3u8")) {
return pathSegment.replace(".m3u8", "");
}
}
return null;
}
}