Revert "ELementum Come Client di Default"

This reverts commit 27ae5c8058.
This commit is contained in:
Alhaziel01
2020-04-19 23:01:48 +02:00
parent d283aeb939
commit 764f33fbee
178 changed files with 6501 additions and 1394 deletions
+39
View File
@@ -0,0 +1,39 @@
# -*- coding: utf-8 -*-
from monitor import Monitor
import traceback
try:
import xbmc, xbmcgui
except:
pass
from platformcode import config
LIBTORRENT_PATH = config.get_setting("libtorrent_path", server="torrent", default='')
from servers import torrent as torr
lt, e, e1, e2 = torr.import_libtorrent(LIBTORRENT_PATH)
class Dispatcher(Monitor):
def __init__(self, client):
super(Dispatcher, self).__init__(client)
def do_start(self, th, ses):
self._th = th
self._ses = ses
self.start()
def run(self):
if not self._ses:
raise Exception('Invalid state, session is not initialized')
while self.running:
a = self._ses.wait_for_alert(1000)
if a:
alerts = self._ses.pop_alerts()
for alert in alerts:
with self.lock:
for cb in self.listeners:
cb(lt.alert.what(alert), alert)