|
@@ -608,6 +608,7 @@ X-Requested-With: XMLHttpRequest
|
608
|
608
|
else:
|
609
|
609
|
title = ch["name"]
|
610
|
610
|
desc = title
|
|
611
|
+ img = ""
|
611
|
612
|
elif vtype == "record-streams":
|
612
|
613
|
epg = self.get_epg_id(vid)
|
613
|
614
|
if epg:
|
|
@@ -615,10 +616,12 @@ X-Requested-With: XMLHttpRequest
|
615
|
616
|
t1 = datetime.datetime.fromtimestamp(int(epg["unix_start"])).strftime('%H:%M')
|
616
|
617
|
t2 = datetime.datetime.fromtimestamp(int(epg["unix_stop"])).strftime('%H:%M')
|
617
|
618
|
date = epg["date"]
|
618
|
|
- title = "%s (%s %s-%s)"%(title,date,t1,t2)
|
619
|
|
- desc = epg["description"]
|
|
619
|
+ #title = "%s [%s %s-%s]"%(title,date,t1,t2)
|
|
620
|
+ desc = title + "\n" + epg["description"].encode("utf8")
|
|
621
|
+ img = epg["img"].encode("utf8") if "img" in epg else ""
|
620
|
622
|
else:
|
621
|
623
|
title = desc = data
|
|
624
|
+ img = ""
|
622
|
625
|
|
623
|
626
|
streams = []
|
624
|
627
|
for s in r["data"]:
|
|
@@ -626,6 +629,7 @@ X-Requested-With: XMLHttpRequest
|
626
|
629
|
stream["url"]=(s["attributes"]["stream-url"]+token.encode("utf8")).encode("utf8")
|
627
|
630
|
stream["name"]=title
|
628
|
631
|
stream["desc"]=desc
|
|
632
|
+ stream["img"] = img
|
629
|
633
|
stream["type"]="hls"
|
630
|
634
|
m=re.search(".+_(\w\w)_(\w\w)\.\w+",s["id"])
|
631
|
635
|
if m:
|
|
@@ -763,6 +767,7 @@ X-Requested-With: XMLHttpRequest
|
763
|
767
|
item["time_start2"] = datetime.datetime.fromtimestamp(int(item["unix_start"]))
|
764
|
768
|
item["time_stop2"] = datetime.datetime.fromtimestamp(int(item["unix_stop"]))
|
765
|
769
|
item["date"]=item["time_start2"].strftime("%Y-%m-%d")
|
|
770
|
+ item["img"] = "https://manstv.lattelecom.tv/" + item["url"]
|
766
|
771
|
return item
|
767
|
772
|
|
768
|
773
|
def get_epg_date(self,date,chid):
|
|
@@ -774,6 +779,7 @@ X-Requested-With: XMLHttpRequest
|
774
|
779
|
item = self.epg[it]
|
775
|
780
|
if item["channel_id"]==ch["xprs_id"]:
|
776
|
781
|
items.append(item)
|
|
782
|
+ items.reverse()
|
777
|
783
|
return items
|
778
|
784
|
|
779
|
785
|
|