@@ -139,16 +139,16 @@ def get_mylist(self, content_filter=None, cache=CACHE_ONLY):
139
139
140
140
return items
141
141
142
- def add_mylist (self , video_type , content_id ):
142
+ def add_mylist (self , content_id ):
143
143
""" Add an item to My List. """
144
- util .http_put (API_ENDPOINT + '/%s/userData/myList/%s/%s ' % (self ._mode (), video_type , content_id ),
144
+ util .http_put (API_ENDPOINT + '/%s/userData/myList/%s' % (self ._mode (), content_id ),
145
145
token = self ._tokens .access_token ,
146
146
profile = self ._tokens .profile )
147
147
kodiutils .set_cache (['swimlane' , 'my-list' ], None )
148
148
149
- def del_mylist (self , video_type , content_id ):
149
+ def del_mylist (self , content_id ):
150
150
""" Delete an item from My List. """
151
- util .http_delete (API_ENDPOINT + '/%s/userData/myList/%s/%s ' % (self ._mode (), video_type , content_id ),
151
+ util .http_delete (API_ENDPOINT + '/%s/userData/myList/%s' % (self ._mode (), content_id ),
152
152
token = self ._tokens .access_token ,
153
153
profile = self ._tokens .profile )
154
154
kodiutils .set_cache (['swimlane' , 'my-list' ], None )
@@ -170,7 +170,7 @@ def get_movie(self, movie_id, cache=CACHE_AUTO):
170
170
171
171
if not movie :
172
172
# Fetch from API
173
- response = util .http_get (API_ENDPOINT + '/%s/movies /%s' % (self ._mode (), movie_id ),
173
+ response = util .http_get (API_ENDPOINT + '/%s/detail /%s' % (self ._mode (), movie_id ),
174
174
token = self ._tokens .access_token ,
175
175
profile = self ._tokens .profile )
176
176
movie = json .loads (response .text )
@@ -211,7 +211,7 @@ def get_program(self, program_id, cache=CACHE_AUTO):
211
211
212
212
if not program :
213
213
# Fetch from API
214
- response = util .http_get (API_ENDPOINT + '/%s/programs /%s' % (self ._mode (), program_id ),
214
+ response = util .http_get (API_ENDPOINT + '/%s/detail /%s' % (self ._mode (), program_id ),
215
215
token = self ._tokens .access_token ,
216
216
profile = self ._tokens .profile )
217
217
program = json .loads (response .text )
@@ -224,10 +224,10 @@ def get_program(self, program_id, cache=CACHE_AUTO):
224
224
episodes = {}
225
225
226
226
# Fetch season
227
- season_response = util .http_get (API_ENDPOINT + '/%s/programs /%s/seasons/ %s' % (self ._mode (), program_id , item_season ),
227
+ season_response = util .http_get (API_ENDPOINT + '/%s/detail /%s?selectedSeasonIndex= %s' % (self ._mode (), program_id , item_season ),
228
228
token = self ._tokens .access_token ,
229
229
profile = self ._tokens .profile )
230
- season = json .loads (season_response .text )
230
+ season = json .loads (season_response .text ). get ( 'selectedSeason' )
231
231
232
232
for item_episode in season .get ('episodes' , []):
233
233
episodes [item_episode .get ('index' )] = Episode (
@@ -315,7 +315,7 @@ def get_episode(self, episode_id):
315
315
:type episode_id: str
316
316
:rtype Episode
317
317
"""
318
- response = util .http_get (API_ENDPOINT + '/%s/play/episodes/ %s' % (self ._mode (), episode_id ),
318
+ response = util .http_get (API_ENDPOINT + '/%s/play/%s' % (self ._mode (), episode_id ),
319
319
token = self ._tokens .access_token ,
320
320
profile = self ._tokens .profile )
321
321
episode = json .loads (response .text )
0 commit comments