Fix problem with MFC segment downloads by restricting MFC to HTTP/1.1

This commit is contained in:
0xb00bface 2021-06-06 15:22:06 +02:00
parent a9536a428f
commit d4c50fd374
5 changed files with 9 additions and 2 deletions

View File

@ -3,6 +3,7 @@
* Added Amateur.TV
* Added XloveCam
* Improved Chaturbate search
* Fixed problem with MFC segment downloads by restricting MFC to HTTP/1.1
* Fixed tipping function
* Fixed bug in recording precondition check, which caused recordings to get
restarted. The bug occured when model groups were used in combination with

View File

@ -62,7 +62,7 @@ public class SegmentDownload implements Callable<SegmentDownload> {
if (tries == 3) {
LOG.warn("Error while downloading segment for {}. Segment {} finally failed: {}", model, url.getFile(), e.getMessage());
} else {
LOG.debug("Error while downloading segment for {} on try {} - {}", model, tries, e.getMessage());
LOG.debug("Error while downloading segment {} for {} on try {} - {}", url.getFile(), model, tries, e.getMessage());
}
}
}

View File

@ -640,7 +640,7 @@ public class MyFreeCamsClient {
String phasePrefix = phase.equals("z") ? "" : '_' + phase;
String server = "video" + getCamServ(state).replaceAll("^\\D+", "");
String nonce = Double.toString(Math.random());
String streamUrl = HTTPS + server + ".myfreecams.com/NxServer/ngrp:mfc" + phasePrefix + '_' + userChannel + ".f4v_mobile/playlist.m3u8?nc=" + nonce;
String streamUrl = HTTPS + server + ".myfreecams.com/NxServer/ngrp:mfc" + phasePrefix + '_' + userChannel + ".f4v_mobile/playlist.m3u8?nc=" + nonce + "&v=1.96";
return streamUrl;
}

View File

@ -3,6 +3,7 @@ package ctbrec.sites.mfc;
import static ctbrec.io.HttpConstants.*;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;
import java.util.Locale;
import java.util.NoSuchElementException;
@ -20,6 +21,7 @@ import okhttp3.Cookie;
import okhttp3.CookieJar;
import okhttp3.FormBody;
import okhttp3.HttpUrl;
import okhttp3.Protocol;
import okhttp3.Request;
import okhttp3.RequestBody;
import okhttp3.Response;
@ -32,6 +34,9 @@ public class MyFreeCamsHttpClient extends HttpClient {
public MyFreeCamsHttpClient() {
super("myfreecams");
client = client.newBuilder()
.protocols(Arrays.asList(Protocol.HTTP_1_1))
.build();
}
@Override

View File

@ -5,6 +5,7 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>