Revision 11d68e9c
Added by Leszek Koltunski almost 3 years ago
src/main/java/org/distorted/network/RubikNetwork.java | ||
---|---|---|
486 | 486 |
{ |
487 | 487 |
RubikScores scores = RubikScores.getInstance(); |
488 | 488 |
String name = URLencode(scores.getName()); |
489 |
String veri = scores.isVerified() ? name : ""; |
|
490 | 489 |
int numRuns = scores.getNumRuns(); |
491 | 490 |
int numPlay = scores.getNumPlays(); |
492 | 491 |
String country = scores.getCountry(); |
493 | 492 |
|
494 | 493 |
String url="https://distorted.org/magic/cgi-bin/download.cgi"; |
495 |
url += "?n="+name+"&v="+veri+"&r="+numRuns+"&p="+numPlay+"&c="+country+"&e="+mVersion+"d"; |
|
496 |
url += "&o="+getObjectList()+"&min=0&max="+MAX_LEVEL+"&l="+MAX_PLACES; |
|
494 |
url += "?n="+name+"&r="+numRuns+"&p="+numPlay+"&c="+country+"&e="+mVersion; |
|
497 | 495 |
|
498 | 496 |
return url; |
499 | 497 |
} |
... | ... | |
504 | 502 |
{ |
505 | 503 |
RubikScores scores = RubikScores.getInstance(); |
506 | 504 |
String name = URLencode(scores.getName()); |
507 |
String veri = scores.isVerified() ? name : "";
|
|
505 |
String veri = scores.isVerified() ? "1" : "";
|
|
508 | 506 |
int numRuns = scores.getNumRuns(); |
509 | 507 |
int numPlay = scores.getNumPlays(); |
510 | 508 |
int deviceID= scores.getDeviceID(); |
... | ... | |
521 | 519 |
version = parseVersion(type,version); |
522 | 520 |
|
523 | 521 |
String url1="https://distorted.org/magic/cgi-bin/submit.cgi"; |
524 |
String url2 = "n="+name+"&v="+veri+"&r="+numRuns+"&p="+numPlay+"&i="+deviceID+"&e="+mVersion+"d"; |
|
525 |
url2 += "&d="+renderer+"&s="+version; |
|
526 |
url2 += reclist+"&c="+country+"&f="+epoch+"&oo="+getObjectList(); |
|
527 |
url2 += "&min=0&max="+MAX_LEVEL+"&lo="+MAX_PLACES; |
|
522 |
String url2 = "n="+name+"&v="+veri+"&r="+numRuns+"&p="+numPlay+"&i="+deviceID+"&e="+mVersion; |
|
523 |
url2 += "&d="+renderer+"&s="+version+reclist+"&c="+country+"&f="+epoch; |
|
528 | 524 |
String hash = computeHash( url2, salt.getBytes() ); |
529 | 525 |
|
530 | 526 |
return url1 + "?" + url2 + "&h=" + hash; |
Also available in: Unified diff
Simplify networking.