def close(self):
if not self.isClosing:
self.isClosing = True
if self.player.isPlaying():
if ADDON.getSetting('stop.on.exit') == "true":
self.player.stop()
self.clear_catchup()
f = xbmcvfs.File('special://profile/addon_data/script.tvguide.fullscreen/tvdb.pickle','wb')
try:
pickle.dump(self.tvdb_urls,f)
except:
pass
f.close()
file_name = 'special://profile/addon_data/script.tvguide.fullscreen/custom_stream_urls_autosave.ini'
xbmcvfs.copy(file_name,file_name+".last")
f = xbmcvfs.File(file_name,'wb')
if self.database:
stream_urls = self.database.getCustomStreamUrls()
for (name,stream) in stream_urls:
write_str = "%s=%s\n" % (name,stream)
f.write(write_str.encode("utf8"))
f.close()
if self.database:
self.database.close(super(TVGuide, self).close)
else:
super(TVGuide, self).close()
评论列表
文章目录