Normalize urlHandle in isOnline for MVLive

This commit is contained in:
0xb00bface 2023-04-09 13:18:01 +02:00
parent ac2c8ded4d
commit 36fa8cd6b7
1 changed files with 2 additions and 1 deletions

View File

@ -43,7 +43,8 @@ public class MVLiveModel extends AbstractModel {
@Override
public boolean isOnline(boolean ignoreCache) throws IOException, ExecutionException, InterruptedException {
if (ignoreCache) {
String url = "https://creator-api.vidchat.manyvids.com/creator?urlHandle=" + URLEncoder.encode(getName(), UTF_8);
String urlHandle = getDisplayName().toLowerCase().replace(" ", "-");
String url = "https://creator-api.vidchat.manyvids.com/creator?urlHandle=" + URLEncoder.encode(urlHandle, UTF_8);
Request req = new Request.Builder()
.url(url)
.header(USER_AGENT, Config.getInstance().getSettings().httpUserAgent)