0.6.2 JSW
- Add a file:/// URL to JSON_BASE_URLS to support the use of /etc/mythtv-epg-nz for configuring xmltv-proc-nz, as required for
Andrew Ruthven's .deb install.
+0.6.3 JSW
+ - Fix Sky Movies procssing, so that it works.
+ - Sky Movies: Move PREMIERE to description.
+ - Sky Movies: Join up split titles where part of the title is in the subtitle.
"""
#TODO: Find repeats
#TODO: Regex replacements for categories
self.sky_movies_xmltvid_list = None
for json_base_url in JSON_BASE_URLS:
try:
- data = urlopen('%s/sky_movies_xmltvids/+json' % json_base_url).read()
+ data = urlopen('%s/sky-movies-xmltvids/+json' % json_base_url).read()
except IOError:
log.warning('SkyMoviesChannels: Fetching data from %s failed.' % json_base_url)
else:
try:
sky_movies_xmltvid_list = json.loads(data)
- if self.categories == None:
+ if self.sky_movies_xmltvid_list == None:
self.sky_movies_xmltvid_list = sky_movies_xmltvid_list
else:
self.sky_movies_xmltvid_list += sky_movies_xmltvid_list
)
else:
#sys.stderr.write('programme=' + ElementTree.tostring(programme, encoding='utf-8') + '\n')
- programme.find('desc').text = programme.find('sub-title').text + ' ' + programme.find('desc').text
+ title = programme.find('title').text
+ subtitle = programme.find('sub-title').text
+ premiere = False
+ if title != 'Stay tuned...' and title != 'On DUKE today...':
+ if title[0:9] == 'PREMIERE ':
+ premiere = True
+ title = title[9:]
+ if title[0:10] == 'PREMIERE: ':
+ premiere = True
+ title = title[10:]
+ if title[-3:] == '...':
+ if subtitle[0:3] == '...':
+ subtitle = subtitle[3:]
+ location = subtitle.find('. ')
+ if location != -1:
+ title_second_part = subtitle[0:location]
+ subtitle = subtitle[location+2:]
+ title = title[0:-3] + ' ' + title_second_part
+ programme.find('title').text = title
+ programme.find('desc').text = ('PREMIERE: ' if premiere else '') + subtitle + ' ' + programme.find('desc').text
programme.find('sub-title').text = ''
log.info(
'SkyMoviesChannels: channel=%s title=%s fixed',