pull/1/head
DiMartinoXBMC 2016-03-07 21:12:53 +03:00
parent 8d4a28e91e
commit f55c56cf60
1 changed files with 32 additions and 32 deletions

View File

@ -186,7 +186,7 @@ class AnteoLoader:
return filelist return filelist
def saveTorrent(self, torrentUrl): def saveTorrent(self, torrentUrl):
if not xbmcvfs.exists(torrentUrl) or re.match("^http.+$", torrentUrl): #if not xbmcvfs.exists(torrentUrl) or re.match("^http.+$", torrentUrl):
if re.match("^magnet\:.+$", torrentUrl): if re.match("^magnet\:.+$", torrentUrl):
self.magnetLink = torrentUrl self.magnetLink = torrentUrl
self.magnetToTorrent(torrentUrl) self.magnetToTorrent(torrentUrl)
@ -217,8 +217,8 @@ class AnteoLoader:
log('Unable to rename torrent file from %s to %s in AnteoLoader::saveTorrent. Exception: %s' % log('Unable to rename torrent file from %s to %s in AnteoLoader::saveTorrent. Exception: %s' %
(torrentUrl, torrentFile, str(e))) (torrentUrl, torrentFile, str(e)))
return return
else: #else:
torrentFile = torrentUrl #torrentFile = torrentUrl
if xbmcvfs.exists(torrentFile) and not os.path.exists(torrentFile): if xbmcvfs.exists(torrentFile) and not os.path.exists(torrentFile):
if not xbmcvfs.exists(self.torrentFilesPath): xbmcvfs.mkdirs(self.torrentFilesPath) if not xbmcvfs.exists(self.torrentFilesPath): xbmcvfs.mkdirs(self.torrentFilesPath)
torrentFile = os.path.join(self.torrentFilesPath, self.md5(torrentUrl) + '.torrent') torrentFile = os.path.join(self.torrentFilesPath, self.md5(torrentUrl) + '.torrent')