|
@@ -76,12 +76,12 @@ Accept-Language: en-US,en;q=0.8
|
76
|
76
|
if clist=="home":
|
77
|
77
|
content.extend([
|
78
|
78
|
("TV tiešraides", "ltc::tiesraide","","TV tiešraides"),
|
79
|
|
- ("TV arhīvs", "ltc::arhivs","","TV arhīvs atseviškiem kanāliem"),
|
80
|
|
- ("Bērnu", "ltc::videonoma/bernu","","Videonomas bērnu filmas un seriāli"),
|
81
|
|
- ("Filmas", "ltc::videonoma/filmas","","Videonomas filmas"),
|
82
|
|
- ("Premiere filmas", "ltc::videonoma/premiere","","Videonomas premiere filmas"),
|
83
|
|
- ("Seriāli", "ltc::videonoma/series","","Videonomas seriāli"),
|
84
|
|
- ("360 Play", "ltc::videonoma/360play","","Videonomas lattelecom saturs"),
|
|
79
|
+ ("TV arhīvs", "ltc::pages/archive","","TV arhīvs atseviškiem kanāliem"),
|
|
80
|
+ ("Bērnu", "ltc::pages/kids","","Videonomas bērnu filmas un seriāli"),
|
|
81
|
+ ("Filmas", "ltc::pages/films","","Videonomas filmas"),
|
|
82
|
+ ("Premiere filmas", "ltc::pages/premiere","","Videonomas premiere filmas"),
|
|
83
|
+ ("Seriāli", "ltc::pages/series","","Videonomas seriāli"),
|
|
84
|
+ ("360 Play", "ltc::/pages/360-play","","Videonomas lattelecom saturs"),
|
85
|
85
|
("Meklēt", "ltc::search/{0}","","Meklēt visā saturā"), #TODO
|
86
|
86
|
])
|
87
|
87
|
return content
|
|
@@ -96,10 +96,11 @@ Accept-Language: en-US,en;q=0.8
|
96
|
96
|
### Tiešraides ####
|
97
|
97
|
elif data=="tiesraide":
|
98
|
98
|
now = dt2ts(dt.now())
|
99
|
|
- epgs = self.call("content/epgs/?filter[utFrom]=%s&filter[utTo]=%s&include=channel&page[size]=1000" % (now, now))["data"]
|
|
99
|
+ r = self.call("epgs/?filter[utFrom]=%s&filter[utTo]=%s&include=channel&page[size]=1000" % (now, now))
|
|
100
|
+ epgs = r["data"]
|
100
|
101
|
for item in self.get_channels():
|
101
|
102
|
title = item["attributes"]["title"]
|
102
|
|
- data2 = "content/live-streams/%s?include=quality"%item["id"]
|
|
103
|
+ data2 = "live-streams/%s?include=quality"%item["id"]
|
103
|
104
|
for epg in epgs:
|
104
|
105
|
if item["id"] == epg["relationships"]["channel"]["data"]["id"]:
|
105
|
106
|
epg = epg["attributes"]
|
|
@@ -122,9 +123,10 @@ Accept-Language: en-US,en;q=0.8
|
122
|
123
|
content.append((title,self.name+"::"+data2,img,desc))
|
123
|
124
|
return content
|
124
|
125
|
|
125
|
|
- ### TV arhīva sākums ###
|
126
|
|
- elif data=="archive" or data=="arhivs":
|
127
|
|
- r = self.call("pages/archive/?include=items,items.item")
|
|
126
|
+
|
|
127
|
+ ### Pages ###
|
|
128
|
+ elif clist=="pages" or data=="arhivs":
|
|
129
|
+ r = self.call(data+"?page[size]=1000")
|
128
|
130
|
for item in r["data"]:
|
129
|
131
|
title = item["attributes"]["title"]
|
130
|
132
|
data2 = item["links"]["self"][1:] + "?include=items"
|
|
@@ -134,6 +136,18 @@ Accept-Language: en-US,en;q=0.8
|
134
|
136
|
return content
|
135
|
137
|
|
136
|
138
|
|
|
139
|
+ ### Kategorija ###
|
|
140
|
+ elif clist=="categories" and len(plist) > 1:
|
|
141
|
+ r = self.call(data)
|
|
142
|
+ for item in r["items"]:
|
|
143
|
+ title = item["name"]
|
|
144
|
+ data2 = "archive/records?filter[category]=%s&limit=40"%item["id"]
|
|
145
|
+ img = "https://manstv.lattelecom.tv/"+ item['image']
|
|
146
|
+ desc = title
|
|
147
|
+ content.append((title,self.name+"::"+data2,img,desc))
|
|
148
|
+ return content
|
|
149
|
+
|
|
150
|
+
|
137
|
151
|
### Arhīva kategorijas
|
138
|
152
|
elif data=="archive/categories":
|
139
|
153
|
#https://manstv.lattelecom.tv/api/v1.3/get/archive/records/?filter[category]=13&limit=10&until_id=1458681019238
|
|
@@ -635,12 +649,10 @@ Accept-Language: en-US,en;q=0.8
|
635
|
649
|
return streams
|
636
|
650
|
|
637
|
651
|
def is_video(self,data):
|
638
|
|
- if "::" in data:
|
639
|
|
- data = data.split("::")[1]
|
640
|
|
- cmd = data.split("/")
|
|
652
|
+ source, data, path, plist, clist, params, qs = self.parse_data(data)
|
641
|
653
|
if "get-stream" in data:
|
642
|
654
|
return True
|
643
|
|
- elif cmd[0] in ("content") and cmd[1] in ("live-streams","record-streams","vod-streams", "catchup"):
|
|
655
|
+ if clist in ("live-streams","record-streams","vod-streams", "catchup"):
|
644
|
656
|
return True
|
645
|
657
|
elif cmd[0]=="arhivs" and len(cmd)==4:
|
646
|
658
|
return True
|
|
@@ -654,7 +666,7 @@ Accept-Language: en-US,en;q=0.8
|
654
|
666
|
return self.ch
|
655
|
667
|
#if not self.check_logedin():
|
656
|
668
|
# self.login() # citādi nerāda TV3, LNT, TV6
|
657
|
|
- r= self.call("content/channels?page[size]=1000&&filter[state]=1")
|
|
669
|
+ r= self.call("channels?page[size]=1000&&filter[state]=1")
|
658
|
670
|
self.ch=[]
|
659
|
671
|
for i,item in enumerate(r["data"]):
|
660
|
672
|
self.ch.append(item)
|