|
|
|
|
@ -137,7 +137,7 @@ public class API { |
|
|
|
|
private boolean checkAuth(String result) { |
|
|
|
|
if (result.contains("AccessTokenInvalid")) return refreshAccessToken(); |
|
|
|
|
if (result.contains("ShareLinkTokenInvalid") || result.contains("InvalidParameterNotMatch")) return refreshShareToken(); |
|
|
|
|
return false; |
|
|
|
|
return checkQuotaExhausted(result); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private boolean checkOpen(String result) { |
|
|
|
|
@ -145,6 +145,13 @@ public class API { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private boolean checkQuotaExhausted(String result) { |
|
|
|
|
if (!result.contains("QuotaExhausted")) return false; |
|
|
|
|
Init.show("容量不夠拉,趕快清一清。"); |
|
|
|
|
auth.clean(); |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private boolean checkManyRequest(String result) { |
|
|
|
|
if (!result.contains("Too Many Requests")) return false; |
|
|
|
|
Init.show("洗洗睡吧,Too Many Requests。"); |
|
|
|
|
|