Skip to content

Commit

Permalink
Merge branch 'release/3.1.0'
Browse files Browse the repository at this point in the history
hinzugefuegt: GZIP für ZDF-Crawler

closed #139
  • Loading branch information
alex1702 committed May 5, 2017
2 parents a423e47 + 9c70f44 commit 2fcb0dd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ apply from: "${project.rootDir}/gradle/eclipse.gradle"
sourceCompatibility = 1.8
targetCompatibility = 1.8
group = 'de.mediathekview'
version = '3.0.11'
version = '3.1.0'

def jarName = 'MServer.jar'
def mainClass = 'mServer.Main'
Expand Down
7 changes: 4 additions & 3 deletions src/main/java/mServer/crawler/sender/newsearch/ZDFClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.sun.jersey.api.client.Client;
import com.sun.jersey.api.client.ClientResponse;
import com.sun.jersey.api.client.WebResource;
import com.sun.jersey.api.client.filter.GZIPContentEncodingFilter;

import de.mediathekview.mlib.Const;
import de.mediathekview.mlib.tool.Log;
Expand Down Expand Up @@ -53,6 +54,7 @@ public class ZDFClient {

public ZDFClient() {
client = Client.create();
client.addFilter(new GZIPContentEncodingFilter(true));
gson = new Gson();
}

Expand Down Expand Up @@ -124,12 +126,11 @@ private String loadApiTokenVideos() {
private JsonObject handleOk(ClientResponse response) {
increment(RunSender.Count.ANZAHL);

String jsonOutput = response.getEntity(String.class);

long bytes = jsonOutput.length();
long bytes = response.getLength();
increment(RunSender.Count.SUM_DATA_BYTE, bytes);
increment(RunSender.Count.SUM_TRAFFIC_BYTE, bytes);

String jsonOutput = response.getEntity(String.class);
return gson.fromJson(jsonOutput, JsonObject.class);
}

Expand Down

0 comments on commit 2fcb0dd

Please sign in to comment.