Skip to content

Commit

Permalink
Merge branch 'hotfix/3.1.6'
Browse files Browse the repository at this point in the history
fixed: RBB Sendungen fehlen

closed #180
  • Loading branch information
alex1702 committed Jun 6, 2017
2 parents 14cc24b + 8f4360a commit 3797def
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 12 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.1.5'
version = '3.1.6'

def jarName = 'MServer.jar'
def mainClass = 'mServer.Main'
Expand Down
54 changes: 43 additions & 11 deletions src/main/java/mServer/crawler/sender/MediathekRbb.java
Original file line number Diff line number Diff line change
Expand Up @@ -220,17 +220,28 @@ private void addFilme(String urlSeite) {
String urlNormal = "", urlLow = "";


urlLow = seite3.extract("\"_quality\":1,\"_server\":\"\",\"_cdn\":\"akamai\",\"_stream\":\"http://", "\"");
if (urlLow.isEmpty()) {
urlLow = seite3.extract("\"_quality\":1,\"_server\":\"\",\"_cdn\":\"default\",\"_stream\":\"http://", "\"");
urlLow = getUrlLow("https");
if(urlLow.isEmpty())
{
urlLow =getUrlLow("http");
if(!urlLow.isEmpty())
{
urlLow = "http://" + urlLow;
}
}else {
urlLow = "https://" + urlLow;
}

urlNormal = seite3.extract("\"_quality\":3,\"_server\":\"\",\"_cdn\":\"akamai\",", "\"_stream\":\"http://", "\"");
if (urlNormal.isEmpty()) {
urlNormal = seite3.extract("\"_quality\":3,\"_server\":\"\",\"_cdn\":\"default\"", "\"_stream\":\"http://", "\"");
}
if (urlNormal.isEmpty()) {
urlNormal = seite3.extract("\"_quality\":3,\"_server\":\"\",\"_cdn\":\"default\",\"_stream\":\"http://", "\"");
urlNormal = getUrlNormal("https");
if(urlNormal.isEmpty())
{
urlNormal =getUrlNormal("http");
if(!urlNormal.isEmpty())
{
urlNormal = "http://" + urlNormal;
}
}else {
urlNormal = "https://" + urlNormal;
}
//http://http-stream.rbb-online.de/rbb/rbbreporter/rbbreporter_20151125_solange_ich_tanze_lebe_ich_WEB_L_16_9_960x544.mp4?url=5
if (urlLow.contains("?url=")) {
Expand Down Expand Up @@ -258,12 +269,10 @@ private void addFilme(String urlSeite) {
Log.errorLog(912012036, "empty für: " + urlSeite);
}
if (!urlNormal.isEmpty()) {
urlNormal = "http://" + urlNormal;
DatenFilm film = new DatenFilm(SENDERNAME, thema, urlSeite, title, urlNormal, "" /*urlRtmp*/,
datum, zeit/* zeit */, duration, description);
addFilm(film);
if (!urlLow.isEmpty()) {
urlLow = "http://" + urlLow;
CrawlerTool.addUrlKlein(film, urlLow, "");
}
if (!subtitle.isEmpty()) {
Expand All @@ -277,5 +286,28 @@ private void addFilme(String urlSeite) {
}
}

private String getUrlNormal(String aProtocol)
{
String urlNormal;
urlNormal = seite3.extract("\"_quality\":3,\"_server\":\"\",\"_cdn\":\"akamai\",", "\"_stream\":\""+aProtocol+"://", "\"");
if (urlNormal.isEmpty()) {
urlNormal = seite3.extract("\"_quality\":3,\"_server\":\"\",\"_cdn\":\"default\"", "\"_stream\":\""+aProtocol+"://", "\"");
}
if (urlNormal.isEmpty()) {
urlNormal = seite3.extract("\"_quality\":3,\"_server\":\"\",\"_cdn\":\"default\",\"_stream\":\""+aProtocol+"://", "\"");
}
return urlNormal;
}

private String getUrlLow(String aProtocol)
{
String urlLow;
urlLow = seite3.extract("\"_quality\":1,\"_server\":\"\",\"_cdn\":\"akamai\",\"_stream\":\""+aProtocol+"://", "\"");
if (urlLow.isEmpty()) {
urlLow = seite3.extract("\"_quality\":1,\"_server\":\"\",\"_cdn\":\"default\",\"_stream\":\""+aProtocol+"://", "\"");
}
return urlLow;
}

}
}

0 comments on commit 3797def

Please sign in to comment.