def setCC(self, service):
if not constants.CONST.CC:
return
#load cachePath if not already loaded
if self.cachePath == '':
self.cachePath = service.settings.cachePath
# there is no cache path setting or the setting is unset -- we should assume user does not want to use caching
# CC files need to be cached (so they can be converted to SRT) -- don't do anything if we don't have the cachePath
if self.cachePath == '':
return
else:
cachePath = str(self.cachePath) + '/' + str(self.package.file.id)+'/'
if not xbmcvfs.exists(cachePath):
xbmcvfs.mkdirs(cachePath)
cachePath = str(cachePath) + str(self.package.file.id)
cc = service.getTTS(self.package.file.srtURL)
if cc:
for file in cc:
if not xbmcvfs.exists(cachePath + str(file[0])):
service.downloadTTS(file[1], str(cachePath) + str(file[0]))
self.srt.append(str(cachePath) + str(file[0]))
##
# fetch the SRT
##
评论列表
文章目录