Skip to content

Commit 7716a5e

Browse files
committed
fix zdf beendet sich nicht richtig
2 parents a9c7a5f + b2ec6ad commit 7716a5e

2 files changed

Lines changed: 14 additions & 10 deletions

File tree

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ sourceCompatibility = JavaVersion.VERSION_17
2727
targetCompatibility = JavaVersion.VERSION_17
2828
group = 'de.mediathekview'
2929
archivesBaseName = "MServer"
30-
version = '3.1.262'
30+
version = '3.1.263'
3131

3232
def jarName = 'MServer.jar'
3333
def mainClass = 'mServer.Main'

src/main/java/mServer/crawler/sender/zdf/json/ZdfTopicBaseClass.java

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import com.google.gson.JsonArray;
44
import com.google.gson.JsonElement;
55
import com.google.gson.JsonObject;
6+
import de.mediathekview.mlib.tool.Log;
67
import mServer.crawler.sender.base.JsonUtils;
78
import mServer.crawler.sender.base.UrlUtils;
89
import mServer.crawler.sender.zdf.ZdfConstants;
@@ -16,7 +17,6 @@
1617

1718
public class ZdfTopicBaseClass {
1819
private static final String PLACEHOLDER_PLAYER_ID = "{playerId}";
19-
// todo check if this is the correct player id
2020
private static final String PLAYER_ID = "android_native_5";
2121

2222
private static final Logger LOG = LogManager.getLogger(ZdfTopicBaseClass.class);
@@ -55,14 +55,18 @@ protected Set<ZdfFilmDto> deserializeMovie(JsonElement episode) {
5555
}
5656

5757
if (title.isPresent()) {
58-
59-
return createFilm(
60-
ZdfConstants.PARTNER_TO_SENDER.get(sender.orElse("EMPTY")),
61-
title.get(),
62-
description,
63-
website,
64-
time,
65-
downloadUrls);
58+
String senderValue = sender.orElse("EMPTY");
59+
if (ZdfConstants.PARTNER_TO_SENDER.containsKey(senderValue)) {
60+
return createFilm(
61+
ZdfConstants.PARTNER_TO_SENDER.get(senderValue),
62+
title.get(),
63+
description,
64+
website,
65+
time,
66+
downloadUrls);
67+
} else {
68+
Log.sysLog("ZDF: unsupported sender: " + senderValue + " for title " + title.get());
69+
}
6670
} else {
6771
LOG.error("ZdfTopicSeasonDeserializer: no title found");
6872
}

0 commit comments

Comments
 (0)