Fix for News settings with auto language
This commit is contained in:
+7
-16
@@ -44,7 +44,9 @@ def mainlist(item):
|
|||||||
|
|
||||||
itemlist = []
|
itemlist = []
|
||||||
list_canales, any_active = get_channels_list()
|
list_canales, any_active = get_channels_list()
|
||||||
channel_language = config.get_setting("channel_language", default="all")
|
channel_language = config.get_setting("channel_language", default="auto")
|
||||||
|
if channel_language == 'auto':
|
||||||
|
channel_language = auto_filter()
|
||||||
|
|
||||||
#if list_canales['peliculas']:
|
#if list_canales['peliculas']:
|
||||||
thumbnail = get_thumb("channels_movie.png")
|
thumbnail = get_thumb("channels_movie.png")
|
||||||
@@ -88,20 +90,6 @@ def mainlist(item):
|
|||||||
set_category_context(new_item)
|
set_category_context(new_item)
|
||||||
itemlist.append(new_item)
|
itemlist.append(new_item)
|
||||||
|
|
||||||
if channel_language == "all" or channel_language == "esp":
|
|
||||||
# if list_canales['Castellano']:
|
|
||||||
thumbnail = get_thumb("channels_spanish.png")
|
|
||||||
new_item = Item(channel=item.channel, action="novedades", extra="castellano", title=config.get_localized_string(70014),
|
|
||||||
thumbnail=thumbnail)
|
|
||||||
set_category_context(new_item)
|
|
||||||
itemlist.append(new_item)
|
|
||||||
|
|
||||||
# if list_canales['Latino']:
|
|
||||||
thumbnail = get_thumb("channels_latino.png")
|
|
||||||
new_item = Item(channel=item.channel, action="novedades", extra="latino", title=config.get_localized_string(59976),
|
|
||||||
thumbnail=thumbnail)
|
|
||||||
set_category_context(new_item)
|
|
||||||
itemlist.append(new_item)
|
|
||||||
if channel_language == "all":
|
if channel_language == "all":
|
||||||
# if list_canales['Italiano']:
|
# if list_canales['Italiano']:
|
||||||
thumbnail = get_thumb("channels_italian.png")
|
thumbnail = get_thumb("channels_italian.png")
|
||||||
@@ -586,7 +574,10 @@ def settings(item):
|
|||||||
|
|
||||||
def setting_channel(item):
|
def setting_channel(item):
|
||||||
channels_path = os.path.join(config.get_runtime_path(), "channels", '*.json')
|
channels_path = os.path.join(config.get_runtime_path(), "channels", '*.json')
|
||||||
channel_language = config.get_setting("channel_language", default="all")
|
channel_language = config.get_setting("channel_language", default="auto")
|
||||||
|
if channel_language == 'auto':
|
||||||
|
channel_language = auto_filter()
|
||||||
|
|
||||||
|
|
||||||
list_controls = []
|
list_controls = []
|
||||||
for infile in sorted(glob.glob(channels_path)):
|
for infile in sorted(glob.glob(channels_path)):
|
||||||
|
|||||||
Reference in New Issue
Block a user