177 |
subtitleurl = getText( doc.getElementsByTagName("subtitles") ) |
subtitleurl = getText( doc.getElementsByTagName("subtitles") ) |
178 |
subtitlesfile = os.path.join(datapath,'temp.srt') |
subtitlesfile = os.path.join(datapath,'temp.srt') |
179 |
|
|
180 |
|
#if old srt file exists delete it first |
181 |
|
if os.path.isfile(subtitlesfile): |
182 |
|
os.unlink(subtitlesfile) |
183 |
|
|
184 |
print '[TODIC] subs: '+str(subtitleurl) |
print '[TODIC] subs: '+str(subtitleurl) |
185 |
if len(subtitleurl) > 0: |
if len(subtitleurl) > 0: |
186 |
subtitles = open_url(subtitleurl) |
subtitles = open_url(subtitleurl) |
209 |
if os.path.isfile(subtitlesfile): |
if os.path.isfile(subtitlesfile): |
210 |
player.setSubtitles(subtitlesfile) |
player.setSubtitles(subtitlesfile) |
211 |
print 'TODIC started subtitles' |
print 'TODIC started subtitles' |
212 |
|
else: |
213 |
|
player.disableSubtitles() |
214 |
|
|
215 |
# player.callbackLoop() |
# player.callbackLoop() |
216 |
|
|