@@ -46,25 +46,25 @@ def __play_video(params):
4646 xbmcplugin .setResolvedUrl (G .get_handle (), True , listitem = play_item )
4747
4848 @staticmethod
49- def __play_tv (cmd ):
49+ def __play_tv (params ):
5050 """Play TV Channel"""
51- Logger .debug ('Play TV {}' .format (cmd ))
52- stream_url = Api .get_tv_stream_url (cmd )
51+ Logger .debug ('Play TV {}' .format (params ))
52+ stream_url = Api .get_tv_stream_url (params )
5353 play_item = xbmcgui .ListItem (path = stream_url )
5454 xbmcplugin .setResolvedUrl (G .get_handle (), True , listitem = play_item )
5555
5656 @staticmethod
5757 def __list_tv_genres ():
58- """List TV channel genres"""
58+ """List the TV channel genres"""
5959 Logger .debug ('List TV Genres' )
6060 xbmcplugin .setPluginCategory (G .get_handle (), 'TV CHANNELS' )
6161 xbmcplugin .setContent (G .get_handle (), 'videos' )
6262 list_item = xbmcgui .ListItem (label = 'TV FAVORITES' )
6363 url = G .get_plugin_url ({'action' : 'tv_favorites' , 'page' : 1 , 'update_listing' : False })
6464 xbmcplugin .addDirectoryItem (G .get_handle (), url , list_item , True )
6565
66- # Add search option
67- list_item = xbmcgui .ListItem (label = 'SEARCH' )
66+ # Add a search option
67+ list_item = xbmcgui .ListItem (label = 'TV SEARCH' )
6868 list_item .setArt ({'thumb' : G .get_custom_thumb_path ('search.png' )})
6969 url = G .get_plugin_url ({'action' : 'tv_search' , 'fav' : 0 , 'isContextMenuSearch' : False })
7070 xbmcplugin .addDirectoryItem (G .get_handle (), url , list_item , True )
@@ -93,8 +93,8 @@ def __list_vod_categories():
9393 url = G .get_plugin_url ({'action' : 'vod_favorites' , 'page' : 1 , 'update_listing' : False })
9494 xbmcplugin .addDirectoryItem (G .get_handle (), url , list_item , True )
9595
96- # Add search option
97- list_item = xbmcgui .ListItem (label = 'SEARCH' )
96+ # Add a search option
97+ list_item = xbmcgui .ListItem (label = 'VOD SEARCH' )
9898 list_item .setArt ({'thumb' : G .get_custom_thumb_path ('search.png' )})
9999 url = G .get_plugin_url ({'action' : 'vod_search' , 'fav' : 0 , 'isContextMenuSearch' : False })
100100 xbmcplugin .addDirectoryItem (G .get_handle (), url , list_item , True )
@@ -122,8 +122,8 @@ def __list_series_categories():
122122 url = G .get_plugin_url ({'action' : 'series_favorites' , 'page' : 1 , 'update_listing' : False })
123123 xbmcplugin .addDirectoryItem (G .get_handle (), url , list_item , True )
124124
125- # Add search option
126- list_item = xbmcgui .ListItem (label = 'SEARCH' )
125+ # Add a search option
126+ list_item = xbmcgui .ListItem (label = 'SERIES SEARCH' )
127127 list_item .setArt ({'thumb' : G .get_custom_thumb_path ('search.png' )})
128128 url = G .get_plugin_url ({'action' : 'series_search' , 'fav' : 0 , 'isContextMenuSearch' : False })
129129 xbmcplugin .addDirectoryItem (G .get_handle (), url , list_item , True )
@@ -142,7 +142,7 @@ def __list_series_categories():
142142
143143 @staticmethod
144144 def __list_channels (params ):
145- """List TV Channels"""
145+ """List the TV Channels"""
146146 Logger .debug ('List Channels {}' .format (params ))
147147 search_term = params .get ('search_term' , '' )
148148 page = params ['page' ]
@@ -173,7 +173,7 @@ def __create_tv_listing(videos, params):
173173 list_item .addContextMenuItems ([('Add to favorites' , f'RunPlugin({ url } , False)' )])
174174 if 'logo' in video :
175175 list_item .setArt ({'icon' : video ['logo' ], 'thumb' : video ['logo' ], 'clearlogo' : video ['logo' ]})
176- url = G .get_plugin_url ({'action' : 'tv_play' , 'cmd' : video ['cmd' ]})
176+ url = G .get_plugin_url ({'action' : 'tv_play' , 'cmd' : video ['cmd' ], 'use_http_tmp_link' : video . get ( 'use_http_tmp_link' , 0 ), 'use_load_balancing' : video . get ( 'use_load_balancing' , 0 ) })
177177 directory_items .append ((url , list_item , False ))
178178 total_items = get_int_value (videos , 'total_items' )
179179 if total_items > item_count :
@@ -446,10 +446,10 @@ def __search_vod(self, params):
446446 """Search for videos"""
447447 Logger .debug ('Search VOD {}' .format (params ))
448448
449- # If category is missing, show category selection popup
449+ # If the category is missing, show the category selection popup
450450 if not params .get ('category' ):
451451 categories = Api .get_vod_categories ()
452- selected_category = ask_for_category_selection (categories , 'VOD' )
452+ selected_category = ask_for_category_selection (categories , 'VOD Category ' )
453453 if not selected_category :
454454 # User cancelled category selection - end directory properly
455455 xbmcplugin .endOfDirectory (G .get_handle (), succeeded = False , updateListing = False , cacheToDisc = False )
@@ -474,10 +474,10 @@ def __search_vod(self, params):
474474 def __search_series (params ):
475475 """Search for videos"""
476476
477- # If category is missing, show category selection popup
477+ # If the category is missing, show the category selection popup
478478 if not params .get ('category' ):
479479 categories = Api .get_series_categories ()
480- selected_category = ask_for_category_selection (categories , 'Series' )
480+ selected_category = ask_for_category_selection (categories , 'Series Category ' )
481481 if not selected_category :
482482 # User cancelled category selection - end directory properly
483483 xbmcplugin .endOfDirectory (G .get_handle (), succeeded = False , updateListing = False , cacheToDisc = False )
@@ -497,10 +497,10 @@ def __search_series(params):
497497 def __search_tv (self , params ):
498498 """Search for videos"""
499499
500- # If category is missing, show category selection popup
500+ # If the category is missing, show the category selection popup
501501 if not params .get ('category' ):
502502 genres = Api .get_tv_genres ()
503- selected_genre = ask_for_category_selection (genres , 'TV' )
503+ selected_genre = ask_for_category_selection (genres , 'TV Genre ' )
504504 if not selected_genre :
505505 # User cancelled category selection - end directory properly
506506 xbmcplugin .endOfDirectory (G .get_handle (), succeeded = False , updateListing = False , cacheToDisc = False )
@@ -569,7 +569,7 @@ def router(self, param_string):
569569 elif params ['action' ] == 'play' :
570570 self .__play_video (params )
571571 elif params ['action' ] == 'tv_play' :
572- self .__play_tv (params [ 'cmd' ] )
572+ self .__play_tv (params )
573573 elif params ['action' ] == 'vod_search' :
574574 self .__search_vod (params )
575575 elif params ['action' ] == 'series_search' :
0 commit comments