- Ottimizzazione get_thumb
- Rimossi set di icone Alfa e Mike
This commit is contained in:
+8
-23
@@ -218,31 +218,16 @@ def filterchannels(category, view="thumb_"):
|
||||
return channelslist
|
||||
|
||||
|
||||
def get_thumb(thumb_name, view="thumb_", auto=False):
|
||||
|
||||
if auto:
|
||||
thumbnail = ''
|
||||
|
||||
thumb_name = unify.set_genre(unify.simplify(thumb_name))
|
||||
|
||||
if thumb_name in thumb_dict:
|
||||
thumbnail = thumb_dict[thumb_name]
|
||||
return thumbnail
|
||||
|
||||
def get_thumb(thumb_name, view="thumb_"):
|
||||
from core import filetools
|
||||
if thumb_name.startswith('http'):
|
||||
return thumb_name
|
||||
elif config.get_setting('enable_custom_theme') and config.get_setting('custom_theme') and filetools.isfile(config.get_setting('custom_theme') + view + thumb_name):
|
||||
media_path = config.get_setting('custom_theme')
|
||||
else:
|
||||
icon_pack_name = config.get_setting('icon_set', default="default")
|
||||
media_path = os.path.join("https://raw.githubusercontent.com/kodiondemand/media/master/themes", icon_pack_name)
|
||||
|
||||
if config.get_setting('enable_custom_theme') and config.get_setting('custom_theme') and os.path.isfile(config.get_setting('custom_theme') + view + thumb_name):
|
||||
media_path = config.get_setting('custom_theme')
|
||||
|
||||
if thumb_name.startswith('http'):
|
||||
thumbnail = thumb_name
|
||||
else:
|
||||
thumbnail = os.path.join(media_path, view + thumb_name)
|
||||
if 'http' in thumbnail:
|
||||
thumbnail = thumbnail.replace('\\','/')
|
||||
return thumbnail
|
||||
media_path = filetools.join("https://raw.githubusercontent.com/kodiondemand/media/master/themes", icon_pack_name)
|
||||
return filetools.join(media_path, view + thumb_name)
|
||||
|
||||
|
||||
def set_channel_info(parameters):
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
<!-- <setting id="category" type="select" label="70124" lvalues="70137|30123|30124|60513" default="Film" visible="eq(-3,True)+eq(-1,True)+eq(-2,False)" enable="eq(-3,True)+eq(-1,True)+(-2,false)"/> -->
|
||||
<!-- Others -->
|
||||
<setting label="70149" type="lsep"/>
|
||||
<setting id="icon_set" type="select" label="70108" values="default|light|dark|alfa|mike" default="default"/>
|
||||
<setting id="icon_set" type="select" label="70108" values="default|light|dark" default="default"/>
|
||||
<setting id="only_channel_icons" type="bool" label="30009" default="false"/>
|
||||
<setting id="enable_custom_theme" type="bool" label="70564" default="false"/>
|
||||
<setting id="custom_theme" type="folder" label="70565" default="" visible="eq(-1,true)"/>
|
||||
|
||||
Reference in New Issue
Block a user