Skip to content

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
cip committed Sep 28, 2015
1 parent f2da920 commit ac498b8
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 63 deletions.
88 changes: 44 additions & 44 deletions default.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,56 +243,56 @@ def CHANNEL_LIST(name, cat_id, schedule=False):

protocol = protocol.strip()
if protocol=='sop':
protocol_color = '[COLOR lightgreen]'+protocol+'[/COLOR]'
protocol_color = '[COLOR lightgreen]'+protocol+'[/COLOR]'
else:
protocol_color = '[COLOR yellow]'+protocol+'[/COLOR]'
protocol_color = '[COLOR yellow]'+protocol+'[/COLOR]'
chan_thumb = thumbnail.strip()
#addon_log(chan_thumb)
chan_status = status

if (((SETTINGS.SHOW_OFFLINE_CH=='true') and (int(chan_status)==1)) or (int(chan_status)!=1)): #if we show or not offline channels based on settings
logo_name = chan_name.replace(' ', '').lower()
logo_name = logo_name.encode('utf8')

chan_name_formatted ="[B][COLOR blue]"+chan_name+"[/COLOR][/B]"
chan_name_formatted += " ("+protocol_color
if(video_codec != ''):
chan_name_formatted += " "+video_codec
chan_name_formatted += ")"
if int(chan_status)==1: chan_name_formatted += " [COLOR red]"+addon.getLocalizedString(30063)+"[/COLOR]" #Offline

thumb_path=""
if chan_thumb and chan_thumb != "":
fileName, fileExtension = os.path.splitext(chan_thumb)
fileName=fileName.split("/")[-1]
if fileName != "":
#thumb_path=os.path.join(ADDON_PATH,"logos",fileName+fileExtension)
fileExtension = fileExtension.encode('utf8')
thumb_path=os.path.join(SETTINGS.ADDON_PATH,"logos",logo_name+fileExtension)

if not os.path.isfile(thumb_path):
if fileName != "":
try:
Downloader(chan_thumb, thumb_path, fileName+fileExtension, addon.getLocalizedString(30055)) #Downloading Channel Logo
except Exception as inst:
pass;

#schedule
if (schedule_id != 0) and \
(schedule or (addon.getSetting('schedule_ch_list') == 'true')) \
and (SETTINGS.DISABLE_SCHEDULE != 'true'):
if (schedule): #update all by context menu
update_all = True
elif(addon.getSetting('schedule_ch_list') == 'true'): #update all when we display channel list
update_all = False
grab_schedule(schedule_id, chan_name, update_all=update_all)

if (SETTINGS.DISABLE_SCHEDULE != 'true') and (int(cat_id) < 200):
schedule_txt = load_schedule(chan_name)
chan_name_formatted += " " + schedule_txt

addLink(id, chan_name_formatted, chan_name, chan_url, protocol, str(schedule_id),
name, cat_id, 2, thumb_path, "", len(rec))
logo_name = chan_name.replace(' ', '').lower()
logo_name = logo_name.encode('utf8')

chan_name_formatted ="[B][COLOR blue]"+chan_name+"[/COLOR][/B]"
chan_name_formatted += " ("+protocol_color
if(video_codec != ''):
chan_name_formatted += " "+video_codec
chan_name_formatted += ")"
if int(chan_status)==1: chan_name_formatted += " [COLOR red]"+addon.getLocalizedString(30063)+"[/COLOR]" #Offline

thumb_path=""
if chan_thumb and chan_thumb != "":
fileName, fileExtension = os.path.splitext(chan_thumb)
fileName=fileName.split("/")[-1]
if fileName != "":
#thumb_path=os.path.join(ADDON_PATH,"logos",fileName+fileExtension)
fileExtension = fileExtension.encode('utf8')
thumb_path=os.path.join(SETTINGS.ADDON_PATH,"logos",logo_name+fileExtension)

if not os.path.isfile(thumb_path):
if fileName != "":
try:
Downloader(chan_thumb, thumb_path, fileName+fileExtension, addon.getLocalizedString(30055)) #Downloading Channel Logo
except Exception as inst:
pass;

#schedule
if (schedule_id != 0) and \
(schedule or (addon.getSetting('schedule_ch_list') == 'true')) \
and (SETTINGS.DISABLE_SCHEDULE != 'true'):
if (schedule): #update all by context menu
update_all = True
elif(addon.getSetting('schedule_ch_list') == 'true'): #update all when we display channel list
update_all = False
grab_schedule(schedule_id, chan_name, update_all=update_all)

if (SETTINGS.DISABLE_SCHEDULE != 'true') and (int(cat_id) < 200):
schedule_txt = load_schedule(chan_name)
chan_name_formatted += " " + schedule_txt

addLink(id, chan_name_formatted, chan_name, chan_url, protocol, str(schedule_id),
name, cat_id, 2, thumb_path, "", len(rec))

xbmc.executebuiltin("Container.SetViewMode(51)")

Expand Down
38 changes: 19 additions & 19 deletions resources/settings.xml
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<settings>
<category label="30000">
<category label="30000">
<setting type="sep" />
<setting id="debug" type="bool" label="30010" default="false"/>
<setting id="wait_time" type="number" label="30011" default="3000"/>
<setting type="sep" />
<setting id="sopcast_arm_path" type="text" label="30020" default=""/>
<setting type="sep" />
</category>
<setting id="debug" type="bool" label="30010" default="false"/>
<setting id="wait_time" type="number" label="30011" default="3000"/>
<setting type="sep" />
<setting id="sopcast_arm_path" type="text" label="30020" default=""/>
<setting type="sep" />
</category>
<category label="30001">
<setting type="lsep" label="30022"/>
<setting id="local_port" type="number" label="30012" default="9000"/>
<setting id="video_port" type="number" label="30013" default="9001"/>
<setting id="buffer_size" type="number" label="30014" default="8192"/>
<setting type="lsep" label="30023"/>
<setting id="ace_host" type="text" label="30024" default="127.0.0.1"/>
<setting id="ace_port" type="number" label="30025" default="62062"/>
</category>
<setting id="ace_host" type="text" label="30024" default="127.0.0.1"/>
<setting id="ace_port" type="number" label="30025" default="62062"/>
</category>
<category label="30002">
<setting type="sep" />
<setting id="disable_schedule" type="bool" label="30015" default="false"/>
<setting id="schedule_ch_list" type="bool" label="30019" default="false"/>
<setting type="sep" />
</category>
</category>
<category label="30003">
<setting type="sep" />
<setting id="chan_list_url" type="text" label="30016" default="http://streams.magazinmixt.ro/ro/streams.json"/>
<setting id="chan_list_expire" type="number" label="30017" default="12"/>
<setting id="show_offline_ch" type="bool" label="30018" default="true"/>
<setting type="sep" />
<setting type="sep" />
<setting id="chan_list_url" type="text" label="30016" default="http://streams.magazinmixt.ro/ro/streams.json"/>
<setting id="chan_list_expire" type="number" label="30017" default="12"/>
<setting id="show_offline_ch" type="bool" label="30018" default="true"/>
<setting type="sep" />
<!--<setting id="language" type="labelenum" label="30018" values="One|Two|Three|Four"/>-->
<!--<setting id="language1" type="select" label="30018" mask="/" source="/resources/country" />-->
</category>
<!--<setting id="language1" type="select" label="30018" mask="/" source="/resources/country" />-->
</category>
<!--
<category label="30004">
<setting id="country_at" type="bool" label="30100" default="true"/>
Expand Down Expand Up @@ -69,4 +69,4 @@
<setting id="lang_none" type="bool" label="30021" default="true"/>
</category>
-->
</settings>
</settings>

0 comments on commit ac498b8

Please sign in to comment.