File tree Expand file tree Collapse file tree
src/main/java/mServer/crawler/sender/zdf/json Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33import com .google .gson .JsonArray ;
44import com .google .gson .JsonElement ;
55import com .google .gson .JsonObject ;
6+ import de .mediathekview .mlib .tool .Log ;
67import mServer .crawler .sender .base .JsonUtils ;
78import mServer .crawler .sender .base .UrlUtils ;
89import mServer .crawler .sender .zdf .ZdfConstants ;
1617
1718public 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 }
You can’t perform that action at this time.
0 commit comments