Example #1
0
 @Override
 public void downloadFile(
     String url, OutputStream out, ProgressListener listener, CancellableTask task)
     throws Exception {
   try {
     super.downloadFile(url, out, listener, task);
   } catch (HttpWrongStatusCodeException e) {
     if (url.contains("/thumb/") && url.endsWith(".jpg") && e.getStatusCode() == 404) {
       super.downloadFile(url.substring(0, url.length() - 3) + "gif", out, listener, task);
     } else {
       throw e;
     }
   }
 }
Example #2
0
 @Override
 public String sendPost(SendPostModel model, ProgressListener listener, CancellableTask task)
     throws Exception {
   super.sendPost(model, listener, task);
   return null;
 }