import opt
parent
6842ebd804
commit
2d95cad3e5
2
Core.py
2
Core.py
|
@ -18,8 +18,6 @@
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
'''
|
'''
|
||||||
|
|
||||||
import tempfile
|
|
||||||
|
|
||||||
import Downloader
|
import Downloader
|
||||||
import xbmc
|
import xbmc
|
||||||
import xbmcaddon
|
import xbmcaddon
|
||||||
|
|
|
@ -21,10 +21,6 @@
|
||||||
import hashlib
|
import hashlib
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import Libtorrent
|
|
||||||
import AceStream
|
|
||||||
import Anteoloader
|
|
||||||
import Inposloader
|
|
||||||
from functions import log
|
from functions import log
|
||||||
|
|
||||||
class Torrent():
|
class Torrent():
|
||||||
|
@ -33,15 +29,19 @@ class Torrent():
|
||||||
def __init__(self, storageDirectory='', torrentFile='', torrentFilesDirectory='torrents'):
|
def __init__(self, storageDirectory='', torrentFile='', torrentFilesDirectory='torrents'):
|
||||||
self.get_torrent_client()
|
self.get_torrent_client()
|
||||||
if self.player == 'libtorrent':
|
if self.player == 'libtorrent':
|
||||||
|
import Libtorrent
|
||||||
self.player = Libtorrent.Libtorrent(storageDirectory, torrentFile, torrentFilesDirectory)
|
self.player = Libtorrent.Libtorrent(storageDirectory, torrentFile, torrentFilesDirectory)
|
||||||
|
|
||||||
elif self.player == 'acestream':
|
elif self.player == 'acestream':
|
||||||
|
import AceStream
|
||||||
self.player = AceStream.AceStream(storageDirectory, torrentFile, torrentFilesDirectory)
|
self.player = AceStream.AceStream(storageDirectory, torrentFile, torrentFilesDirectory)
|
||||||
|
|
||||||
elif self.player == 'anteo':
|
elif self.player == 'anteo':
|
||||||
|
import Anteoloader
|
||||||
self.player = Anteoloader.AnteoLoader(storageDirectory, torrentFile, torrentFilesDirectory)
|
self.player = Anteoloader.AnteoLoader(storageDirectory, torrentFile, torrentFilesDirectory)
|
||||||
|
|
||||||
elif self.player == 'inpos':
|
elif self.player == 'inpos':
|
||||||
|
import Inposloader
|
||||||
self.player = Inposloader.InposLoader(storageDirectory, torrentFile, torrentFilesDirectory)
|
self.player = Inposloader.InposLoader(storageDirectory, torrentFile, torrentFilesDirectory)
|
||||||
|
|
||||||
def __exit__(self):
|
def __exit__(self):
|
||||||
|
|
Loading…
Reference in New Issue