mirror of
https://github.com/MaintainTeam/LastPipeBender.git
synced 2025-03-01 05:48:22 +03:00
now treating error code 409 from the SponsorBlock API as a good result (#18)
This commit is contained in:
parent
b2a5c05df5
commit
651be59f46
1 changed files with 6 additions and 2 deletions
|
@ -2688,10 +2688,14 @@ public final class VideoDetailFragment
|
|||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(response -> {
|
||||
if (response.responseCode() != 200) {
|
||||
final int responseCode = response.responseCode();
|
||||
|
||||
// 200 = all good
|
||||
// 409 = all good, but the request timed out
|
||||
if (responseCode != 200 && responseCode != 409) {
|
||||
String message = response.responseMessage();
|
||||
if (message.equals("")) {
|
||||
message = "Error " + response.responseCode();
|
||||
message = "Error " + responseCode;
|
||||
}
|
||||
Toast.makeText(context,
|
||||
message,
|
||||
|
|
Loading…
Add table
Reference in a new issue