mirror of
https://github.com/fHDHR/fHDHR_NextPVR.git
synced 2025-12-06 06:46:58 -05:00
Compare commits
6 Commits
db49d28de5
...
698e407c38
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
698e407c38 | ||
|
|
8c80c51c2a | ||
|
|
1eca980ae5 | ||
|
|
308c56da09 | ||
|
|
404f44c22d | ||
|
|
cd24c5a4fe |
@ -109,8 +109,8 @@ class tvtvEPG():
|
|||||||
|
|
||||||
def get_cached(self, dates_to_pull):
|
def get_cached(self, dates_to_pull):
|
||||||
for datesdict in dates_to_pull:
|
for datesdict in dates_to_pull:
|
||||||
starttime = str(datesdict["start"]) + "T00%3A00%3A00.000Z"
|
starttime = "%s%s" % (datesdict["start"], "T00%3A00%3A00.000Z")
|
||||||
stoptime = str(datesdict["stop"]) + "T00%3A00%3A00.000Z"
|
stoptime = "%s%s" % (datesdict["stop"], "T00%3A00%3A00.000Z")
|
||||||
url = "https://www.tvtv.us/tvm/t/tv/v4/lineups/%s/listings/grid?start=%s&end=%s" % (self.lineup_id, starttime, stoptime)
|
url = "https://www.tvtv.us/tvm/t/tv/v4/lineups/%s/listings/grid?start=%s&end=%s" % (self.lineup_id, starttime, stoptime)
|
||||||
self.get_cached_item(str(datesdict["start"]), url)
|
self.get_cached_item(str(datesdict["start"]), url)
|
||||||
cache_list = self.fhdhr.db.get_cacheitem_value("cache_list", "epg_cache", "tvtv") or []
|
cache_list = self.fhdhr.db.get_cacheitem_value("cache_list", "epg_cache", "tvtv") or []
|
||||||
|
|||||||
@ -67,28 +67,38 @@ class Channel():
|
|||||||
|
|
||||||
if "name" not in list(channel_info.keys()):
|
if "name" not in list(channel_info.keys()):
|
||||||
channel_info["name"] = self.dict["id"]
|
channel_info["name"] = self.dict["id"]
|
||||||
|
elif not channel_info["name"]:
|
||||||
|
channel_info["name"] = self.dict["id"]
|
||||||
self.dict["origin_name"] = channel_info["name"]
|
self.dict["origin_name"] = channel_info["name"]
|
||||||
if not self.dict["name"]:
|
if not self.dict["name"]:
|
||||||
self.dict["name"] = self.dict["origin_name"]
|
self.dict["name"] = self.dict["origin_name"]
|
||||||
|
|
||||||
if "id" not in list(channel_info.keys()):
|
if "id" not in list(channel_info.keys()):
|
||||||
channel_info["id"] = channel_info["name"]
|
channel_info["id"] = channel_info["name"]
|
||||||
|
elif not channel_info["id"]:
|
||||||
|
channel_info["id"] = channel_info["name"]
|
||||||
self.dict["origin_id"] = channel_info["id"]
|
self.dict["origin_id"] = channel_info["id"]
|
||||||
|
|
||||||
if "callsign" not in list(channel_info.keys()):
|
if "callsign" not in list(channel_info.keys()):
|
||||||
channel_info["callsign"] = channel_info["name"]
|
channel_info["callsign"] = channel_info["name"]
|
||||||
|
elif not channel_info["callsign"]:
|
||||||
|
channel_info["callsign"] = channel_info["name"]
|
||||||
self.dict["origin_callsign"] = channel_info["callsign"]
|
self.dict["origin_callsign"] = channel_info["callsign"]
|
||||||
if not self.dict["callsign"]:
|
if not self.dict["callsign"]:
|
||||||
self.dict["callsign"] = self.dict["origin_callsign"]
|
self.dict["callsign"] = self.dict["origin_callsign"]
|
||||||
|
|
||||||
if "tags" not in list(channel_info.keys()):
|
if "tags" not in list(channel_info.keys()):
|
||||||
channel_info["tags"] = []
|
channel_info["tags"] = []
|
||||||
|
elif not channel_info["tags"]:
|
||||||
|
channel_info["tags"] = []
|
||||||
self.dict["origin_tags"] = channel_info["tags"]
|
self.dict["origin_tags"] = channel_info["tags"]
|
||||||
if not self.dict["tags"]:
|
if not self.dict["tags"]:
|
||||||
self.dict["tags"] = self.dict["origin_tags"]
|
self.dict["tags"] = self.dict["origin_tags"]
|
||||||
|
|
||||||
if "number" not in list(channel_info.keys()):
|
if "number" not in list(channel_info.keys()):
|
||||||
channel_info["number"] = self.id_system.get_number(channel_info["id"])
|
channel_info["number"] = self.id_system.get_number(channel_info["id"])
|
||||||
|
elif not channel_info["number"]:
|
||||||
|
channel_info["number"] = self.id_system.get_number(channel_info["id"])
|
||||||
self.dict["origin_number"] = str(channel_info["number"])
|
self.dict["origin_number"] = str(channel_info["number"])
|
||||||
if not self.dict["number"]:
|
if not self.dict["number"]:
|
||||||
self.dict["number"] = self.dict["origin_number"].split(".")[0]
|
self.dict["number"] = self.dict["origin_number"].split(".")[0]
|
||||||
|
|||||||
@ -99,6 +99,9 @@ class Tuners():
|
|||||||
stream_info = {"url": stream_info}
|
stream_info = {"url": stream_info}
|
||||||
stream_args["stream_info"] = stream_info
|
stream_args["stream_info"] = stream_info
|
||||||
|
|
||||||
|
if not stream_args["stream_info"]["url"]:
|
||||||
|
raise TunerError("806 - Tune Failed")
|
||||||
|
|
||||||
if stream_args["stream_info"]["url"].startswith("udp://"):
|
if stream_args["stream_info"]["url"].startswith("udp://"):
|
||||||
stream_args["true_content_type"] = "video/mpeg"
|
stream_args["true_content_type"] = "video/mpeg"
|
||||||
stream_args["content_type"] = "video/mpeg"
|
stream_args["content_type"] = "video/mpeg"
|
||||||
|
|||||||
@ -56,7 +56,7 @@ class OriginChannels():
|
|||||||
self.fhdhr.config.dict["origin"]["address"],
|
self.fhdhr.config.dict["origin"]["address"],
|
||||||
str(self.fhdhr.config.dict["origin"]["port"]),
|
str(self.fhdhr.config.dict["origin"]["port"]),
|
||||||
str(chandict["origin_id"]),
|
str(chandict["origin_id"]),
|
||||||
"fhdhr_" + str(chandict["origin_number"]),
|
"fhdhr_%s" % chandict["origin_number"],
|
||||||
))
|
))
|
||||||
|
|
||||||
stream_info = {"url": streamurl}
|
stream_info = {"url": streamurl}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user