|
|
|
|
@ -27,6 +27,7 @@ import java.util.regex.Pattern; |
|
|
|
|
|
|
|
|
|
public class LiveParser { |
|
|
|
|
|
|
|
|
|
private static final Pattern CATCHUP_REPLACE = Pattern.compile(".*catchup-replace=\"(.?|.+?)\".*"); |
|
|
|
|
private static final Pattern CATCHUP_SOURCE = Pattern.compile(".*catchup-source=\"(.?|.+?)\".*"); |
|
|
|
|
private static final Pattern CATCHUP = Pattern.compile(".*catchup=\"(.?|.+?)\".*"); |
|
|
|
|
private static final Pattern TVG_LOGO = Pattern.compile(".*tvg-logo=\"(.?|.+?)\".*"); |
|
|
|
|
@ -96,6 +97,7 @@ public class LiveParser { |
|
|
|
|
} else if (line.startsWith("#EXTM3U")) { |
|
|
|
|
catchup.setType(extract(line, CATCHUP)); |
|
|
|
|
catchup.setSource(extract(line, CATCHUP_SOURCE)); |
|
|
|
|
catchup.setReplace(extract(line, CATCHUP_REPLACE)); |
|
|
|
|
if (live.getEpg().isEmpty()) live.setEpg(extract(line, TVG_URL).replace("\"", "")); |
|
|
|
|
if (live.getEpg().isEmpty()) live.setEpg(extract(line, URL_TVG).replace("\"", "")); |
|
|
|
|
if (live.getEpg().isEmpty()) live.setEpg(extract(line, "tvg-url=", "url-tvg=")); |
|
|
|
|
@ -107,6 +109,7 @@ public class LiveParser { |
|
|
|
|
Catchup unknown = Catchup.create(); |
|
|
|
|
unknown.setType(extract(line, CATCHUP)); |
|
|
|
|
unknown.setSource(extract(line, CATCHUP_SOURCE)); |
|
|
|
|
unknown.setReplace(extract(line, CATCHUP_REPLACE)); |
|
|
|
|
channel.setCatchup(Catchup.decide(unknown, catchup)); |
|
|
|
|
} else if (!line.startsWith("#") && line.contains("://")) { |
|
|
|
|
String[] split = line.split("\\|"); |
|
|
|
|
|