feat: RuStore downloader - #226
Conversation
|
gh pr checkout 226 |
nekromant
left a comment
There was a problem hiding this comment.
Best to add rustore params as options.
|
|
||
| fn download_request_body(app_id: u64) -> String { | ||
| serde_json::to_string(&json!({ | ||
| "appId": app_id, |
There was a problem hiding this comment.
Perhaps it might be a good candidates to expose as options for -o flag?
| "appId": app_id, | ||
| "firstInstall": true, | ||
| "mobileServices": ["GMS", "HMS"], | ||
| "supportedAbis": ["arm64-v8a"], |
|
I was almost about to implement it myself, but @Foxushka was way faster. I've thown in a little review on some lines, but overall great work. I hope it gets merged soon. |
|
Please added |
| if let Some(array) = json_response.as_array() { | ||
| if let Some(first_app) = array.first() { | ||
| if let Some(id) = first_app.get("id") { | ||
| return id.as_u64(); |
There was a problem hiding this comment.
The nested code is terrible; it is better to write this logic linearly. The current version is harder to read, debug, and maintain.
| if let Some(array) = download_urls.as_array() { | ||
| if let Some(first_url) = array.first() { | ||
| if let Some(url) = first_url.get("url") { | ||
| return url.as_str().map(|s| s.to_string()); |
There was a problem hiding this comment.
The nested code is terrible; it is better to write this logic linearly. The current version is harder to read, debug, and maintain.
|
Does this code still functional? |
No description provided.