@@ -205,7 +205,7 @@ def show_listing(xml, plex_type=None, section_id=None, synched=True, key=None):
205
205
return
206
206
api = API (xml [0 ])
207
207
# Determine content type for Kodi's Container.content
208
- if key == '/hubs/home/continueWatching' :
208
+ if key == '/hubs/home/continueWatching' or key == 'watchlist' :
209
209
# Mix of movies and episodes
210
210
plex_type = v .PLEX_TYPE_VIDEO
211
211
elif key == '/hubs/home/recentlyAdded?type=2' :
@@ -257,6 +257,10 @@ def show_listing(xml, plex_type=None, section_id=None, synched=True, key=None):
257
257
# filter out items that are not in the kodi db (items that will not be playable)
258
258
all_items = [item for item in all_items if item .kodi_id is not None ]
259
259
260
+ # filter out items in the wrong section id when it's specified
261
+ if section_id is not None :
262
+ all_items = [item for item in all_items if item .section_id == utils .cast (int , section_id )]
263
+
260
264
all_items = [widgets .generate_item (api ) for api in all_items ]
261
265
all_items = [widgets .prepare_listitem (item ) for item in all_items ]
262
266
# fill that listing...
@@ -475,7 +479,7 @@ def watchlater():
475
479
show_listing (xml )
476
480
477
481
478
- def watchlist ():
482
+ def watchlist (section_id = None ):
479
483
"""
480
484
Listing for plex.tv Watchlist section (if signed in to plex.tv)
481
485
"""
@@ -495,7 +499,7 @@ def watchlist():
495
499
except (TypeError , IndexError , AttributeError ):
496
500
LOG .error ('Could not download watch list list from plex.tv' )
497
501
raise ListingException
498
- show_listing (xml , None , None , False , "watchlist" )
502
+ show_listing (xml , None , section_id , False , "watchlist" )
499
503
500
504
501
505
def browse_plex (key = None , plex_type = None , section_id = None , synched = True ,
0 commit comments