Mon May 06, 2013 8:09 am by ditr
You are probably watching series. They recently shuffled some file locations on server and old locations are now returning redirects, that plugin doesn't support. As a workaround before fix - get your url, paste it into browser, you'll see that when it opens the url is changed and is now different. Re-add your series with new url.
Or if you feel adventurous apply this diff
- Code:
--- stepashka.groovy 2013-03-25 03:53:44.000000000 -0700
+++ stepashka.groovy.new 2013-05-06 01:07:31.717540179 -0700
@@ -68,18 +68,35 @@
}
private String openURL(URL url){
- Request request = new Request(Method.GET, url.toString());
Client client = new Client(Protocol.HTTP);
ClientInfo info = new ClientInfo();
info.setAgent(USER_AGENT);
- request.setClientInfo(info);
- Response response = client.handle(request);
- String orPageSource
- if(Status.SUCCESS_OK.equals(response.getStatus())){
- return response.getEntityAsText()
- }
+ Response response = null;
+ int followed = 0;
+ while (response == null && followed < 10) {
+ log("Retrieving URL " + url.toString());
+ Request request = new Request(Method.GET, url.toString());
+ request.setClientInfo(info);
+ response = client.handle(request);
+ String orPageSource
+ if(Status.SUCCESS_OK.equals(response.getStatus())){
+ return response.getEntityAsText()
+ } else if (
+ Status.REDIRECTION_PERMANENT.equals(response.getStatus()) ||
+ Status.REDIRECTION_TEMPORARY.equals(response.getStatus()) ||
+ Status.REDIRECTION_FOUND.equals(response.getStatus())
+ ){
+ url = response.getLocationRef().toUrl();
+ response = null;
+ log("Is redirect to " + url.toString());
+ } else {
+ break;
+ }
+ ++followed;
+ };
return ""
}
+
/**
* Finds all actual video links and titles in received data
* @param data to search
by running copy-pasting this into stepashka.groovy.patch and doing
- Code:
patch stepashka.groovy < stepashka.groovy.patch
There is probably better way of following redirects in java restlets, but I never encountered them before so this is pretty much quick and dirty fix.