|
@@ -67,12 +67,12 @@ class Source(SourceBase):
|
67
|
67
|
|
68
|
68
|
if clist=="home":
|
69
|
69
|
content.extend([
|
70
|
|
- #("Search", "mtgplay::meklet?country=%s&term={0}"%self.country,"","Search videos"), ### TODO
|
|
70
|
+ ("Search", "mtgplay::search?country=%s&term={0}"%self.country,"","Search videos"), ### TODO
|
71
|
71
|
("TV Live", "mtgplay::videos?country=%s&order=title&type=live"%self.country,"","TV live streams(not always available)"),
|
72
|
72
|
("Last videos", "mtgplay::videos?country=%s&order=-airdate"%self.country,"","Last aired videos"),
|
73
|
73
|
("Categories", "mtgplay::categories?country=%s&order=name"%self.country,"","Categories"),
|
74
|
74
|
("Channels", "mtgplay::channels?country=%s&order=id"%self.country,"","TV channels"),
|
75
|
|
- ("Programs by name", "mtgplay::formats?country=%s&order=-title"%self.country,"","Programs by name"),
|
|
75
|
+ ("Programs by name", "mtgplay::formats?country=%s&order=title"%self.country,"","Programs by name"),
|
76
|
76
|
("Programs by popularity", "mtgplay::formats?country=%s&order=-popularity"%self.country,"","Programs by popularity")
|
77
|
77
|
])
|
78
|
78
|
return content
|
|
@@ -88,6 +88,8 @@ class Source(SourceBase):
|
88
|
88
|
content.append(("Previous page", self.name+"::"+data2.encode("utf8"),"", "Goto previous page"))
|
89
|
89
|
|
90
|
90
|
if "_embedded" in r:
|
|
91
|
+ if clist == "search":
|
|
92
|
+ clist = "formats"
|
91
|
93
|
for item in r["_embedded"][clist]:
|
92
|
94
|
if "title" in item:
|
93
|
95
|
title = item["title"]
|
|
@@ -144,11 +146,12 @@ class Source(SourceBase):
|
144
|
146
|
#if "country" in qs: data2 += "&country="+qs["country"]
|
145
|
147
|
#if "category" in qs: data2 += "&category="+qs["category"]
|
146
|
148
|
#if "channel" in qs: data2 += "&channel="+qs["channel"]
|
147
|
|
- data2 += "&order=title"
|
148
|
|
- air_at = item["latest_video"]["publish_at"] if "publish_at" in item["latest_video"] else ""
|
149
|
|
- air_at = air_at[0:16].replace("T"," ") if air_at else ""
|
150
|
|
- if air_at:
|
151
|
|
- desc = "Last video: %s\n"%air_at + desc
|
|
149
|
+ data2 += "&order=-id"
|
|
150
|
+ if "lastest_video" in item:
|
|
151
|
+ air_at = item["latest_video"]["publish_at"] if "publish_at" in item["latest_video"] else ""
|
|
152
|
+ air_at = air_at[0:16].replace("T"," ") if air_at else ""
|
|
153
|
+ if air_at:
|
|
154
|
+ desc = "Last video: %s\n"%air_at + desc
|
152
|
155
|
|
153
|
156
|
### Seasons ###
|
154
|
157
|
elif clist == "seasons":
|
|
@@ -157,7 +160,7 @@ class Source(SourceBase):
|
157
|
160
|
#if "country" in qs: data2 += "&country="+qs["country"]
|
158
|
161
|
#if "category" in qs: data2 += "&category="+qs["category"]
|
159
|
162
|
#if "channel" in qs: data2 += "&channel="+qs["channel"]
|
160
|
|
- data2 += "&order=title"
|
|
163
|
+ data2 += "&order=-id"
|
161
|
164
|
|
162
|
165
|
summary = item["summary"] if "summary" in item and item["summary"] else ""
|
163
|
166
|
try:
|