forked from j62/ctbrec
Fix NPE in MFC client
This commit is contained in:
parent
f1a0e5900c
commit
0858941b50
|
@ -608,7 +608,7 @@ public class MyFreeCamsClient {
|
||||||
|
|
||||||
public String getStreamUrl(SessionState state) {
|
public String getStreamUrl(SessionState state) {
|
||||||
int userChannel = 100000000 + state.getUid();
|
int userChannel = 100000000 + state.getUid();
|
||||||
String phase = state.getU().getPhase() != null ? state.getU().getPhase() : "z";
|
String phase = Optional.ofNullable(state).map(SessionState::getU).map(User::getPhase).orElse("z");
|
||||||
String phasePrefix = phase.equals("z") ? "" : '_' + phase;
|
String phasePrefix = phase.equals("z") ? "" : '_' + phase;
|
||||||
String server = "video" + getCamServ(state).replaceAll("^\\D+", "");
|
String server = "video" + getCamServ(state).replaceAll("^\\D+", "");
|
||||||
String nonce = Double.toString(Math.random());
|
String nonce = Double.toString(Math.random());
|
||||||
|
|
Loading…
Reference in New Issue