From 42999f9dfd6e6b0fe0e1fa01485679f5cb1d2315 Mon Sep 17 00:00:00 2001 From: wonipapa Date: Wed, 19 Apr 2017 18:46:19 +0900 Subject: [PATCH] =?UTF-8?q?iptv=20=EC=84=A4=EC=A0=95=20=EC=9D=B8=EC=88=98?= =?UTF-8?q?=20=EC=82=AC=ED=95=AD=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epg2xml.py | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/epg2xml.py b/epg2xml.py index c17f415..c519144 100644 --- a/epg2xml.py +++ b/epg2xml.py @@ -19,7 +19,7 @@ import pprint reload(sys) sys.setdefaultencoding('utf-8') -__version__ = '1.1.7' +__version__ = '1.1.7p' # Set variable debug = False @@ -56,21 +56,29 @@ def getEpg(): ChannelSource = Channeldata['Source'] ChannelServiceId = Channeldata['ServiceId'] ChannelIconUrl = escape(Channeldata['Icon_url']) - ChannelInfos.append([ChannelId, ChannelName, ChannelSource, ChannelServiceId]) - print(' ' % (ChannelId)) - print(' %s' % (ChannelName)) if MyISP != "ALL" and Channeldata[MyISP+'Ch'] is not None: + ChannelInfos.append([ChannelId, ChannelName, ChannelSource, ChannelServiceId]) ChannelNumber = str(Channeldata[MyISP+'Ch']); ChannelISPName = escape(Channeldata[MyISP+' Name']) + print(' ' % (ChannelId)) + print(' %s' % (ChannelName)) print(' %s' % (ChannelISPName)) print(' %s' % (ChannelNumber)) print(' %s' % (ChannelNumber+' '+ChannelISPName)) - if IconUrl: - print(' ' % (IconUrl, ChannelId)) - else : - print(' ' % (ChannelIconUrl)) - print(' ') - + if IconUrl: + print(' ' % (IconUrl, ChannelId)) + else : + print(' ' % (ChannelIconUrl)) + print(' ') + elif MyISP == "ALL": + ChannelInfos.append([ChannelId, ChannelName, ChannelSource, ChannelServiceId]) + print(' ' % (ChannelId)) + print(' %s' % (ChannelName)) + if IconUrl: + print(' ' % (IconUrl, ChannelId)) + else : + print(' ' % (ChannelIconUrl)) + print(' ') # Print Program Information for ChannelInfo in ChannelInfos: ChannelId = ChannelInfo[0]