перезагрузка пустого torrent-файла
parent
48f56df337
commit
7b7bdd1c6a
8
Core.py
8
Core.py
|
@ -556,9 +556,11 @@ class Core:
|
|||
|
||||
if action2 == 'open':
|
||||
filename, foldername, path, url, seek, length, ind = db.get('filename, foldername, path, url, seek, length, ind', 'addtime', str(addtime))
|
||||
if os.path.exists(path):
|
||||
if os.path.exists(path) and os.path.getsize(path) > 0:
|
||||
self.__settings__.setSetting("lastTorrent", path)
|
||||
else:
|
||||
if os.path.exists(path):
|
||||
os.unlink(path)
|
||||
torrent = Downloader.Torrent(self.userStorageDirectory, torrentFilesDirectory=self.torrentFilesDirectory)
|
||||
path = torrent.saveTorrent(url)
|
||||
self.__settings__.setSetting("lastTorrent", path)
|
||||
|
@ -574,9 +576,11 @@ class Core:
|
|||
seek = int(seek)
|
||||
else:
|
||||
seek = 0
|
||||
if os.path.exists(path):
|
||||
if os.path.exists(path) and os.path.getsize(path) > 0:
|
||||
self.__settings__.setSetting("lastTorrent", path)
|
||||
else:
|
||||
if os.path.exists(path):
|
||||
os.unlink(path)
|
||||
torrent = Downloader.Torrent(self.userStorageDirectory, torrentFilesDirectory=self.torrentFilesDirectory)
|
||||
self.__settings__.setSetting("lastTorrent", torrent.saveTorrent(url))
|
||||
xbmc.executebuiltin('xbmc.RunPlugin("plugin://plugin.video.torrenter/?action=playTorrent&url='+str(ind)+'&seek='+str(seek)+'")')
|
||||
|
|
Loading…
Reference in New Issue