pull/15/head
DiMartinoXBMC 2017-01-10 20:26:45 +03:00
parent ed06cf611e
commit 01f94d009d
4 changed files with 9 additions and 25 deletions

View File

@ -350,16 +350,6 @@ class AnteoPlayer(xbmc.Player):
self.torrentUrl = self.torrentUrl self.torrentUrl = self.torrentUrl
def setup_engine(self): def setup_engine(self):
#uri=None, binaries_path=None, platform=None, download_path=".",
#bind_host='127.0.0.1', bind_port=5001, connections_limit=None, download_kbps=None, upload_kbps=None,
#enable_dht=True, enable_lsd=True, enable_natpmp=True, enable_upnp=True, enable_scrape=False,
#log_stats=False, encryption=Encryption.ENABLED, keep_complete=False, keep_incomplete=False,
#keep_files=False, log_files_progress=False, log_overall_progress=False, log_pieces_progress=False,
#listen_port=6881, use_random_port=False, max_idle_timeout=None, no_sparse=False, resume_file=None,
#user_agent=None, startup_timeout=5, state_file=None, enable_utp=True, enable_tcp=True,
#debug_alerts=False, logger=None, torrent_connect_boost=50, connection_speed=50,
#peer_connect_timeout=15, request_timeout=20, min_reconnect_time=60, max_failcount=3,
#dht_routers=None, trackers=None)
encryption = Encryption.ENABLED if self.__settings__.getSetting('encryption') == 'true' else Encryption.DISABLED encryption = Encryption.ENABLED if self.__settings__.getSetting('encryption') == 'true' else Encryption.DISABLED
upload_limit = int(self.__settings__.getSetting("upload_limit"))*1024/8 if self.__settings__.getSetting( upload_limit = int(self.__settings__.getSetting("upload_limit"))*1024/8 if self.__settings__.getSetting(
@ -400,16 +390,10 @@ class AnteoPlayer(xbmc.Player):
keep_files=keep_files, user_agent=user_agent, resume_file=resume_file, enable_dht=enable_dht) keep_files=keep_files, user_agent=user_agent, resume_file=resume_file, enable_dht=enable_dht)
def buffer(self): def buffer(self):
#self.pre_buffer_bytes = 30*1024*1024 #30 MB
ready = False ready = False
progressBar = xbmcgui.DialogProgress() progressBar = xbmcgui.DialogProgress()
progressBar.create('[%sPlayer v%s] ' % (author, __version__) + self.localize('Please Wait'), progressBar.create('[%sPlayer v%s] ' % (author, __version__) + self.localize('Please Wait'),
self.localize('Seeds searching.')) self.localize('Seeds searching.'))
#if self.subs_dl:
# subs = self.torrent.getSubsIds(os.path.basename(self.torrent.getFilePath(self.contentId)))
# if len(subs) > 0:
# for ind, title in subs:
# self.torrent.continueSession(ind)
while not xbmc.abortRequested and not ready: while not xbmc.abortRequested and not ready:
xbmc.sleep(500) xbmc.sleep(500)
@ -569,10 +553,10 @@ class AnteoPlayer(xbmc.Player):
status = self.engine.status() status = self.engine.status()
file_status = self.engine.file_status(self.contentId) file_status = self.engine.file_status(self.contentId)
self.watchedTime = xbmc.Player().getTime() self.watchedTime = xbmc.Player().getTime()
self.totalTime = xbmc.Player().getTotalTime()
if self.iterator == 100 and debug_counter < 100: if self.iterator == 100 and debug_counter < 100:
debug_counter += 1 debug_counter += 1
else: else:
self.totalTime = xbmc.Player().getTotalTime()
self.print_debug(status) self.print_debug(status)
debug_counter=0 debug_counter=0
@ -586,12 +570,6 @@ class AnteoPlayer(xbmc.Player):
log('[loop]: xbmc.Player().pause()') log('[loop]: xbmc.Player().pause()')
xbmc.sleep(1000) xbmc.sleep(1000)
#if not self.seeding_run and self.iterator == 100 and self.seeding:
#self.seeding_run = True
#self.seed(self.contentId)
#self.seeding_status = True
# xbmc.sleep(7000)
def onPlayBackStarted(self): def onPlayBackStarted(self):
for f in self.on_playback_started: for f in self.on_playback_started:
f() f()

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.torrenter" name="Torrenter" version="2.6.1" provider-name="DiMartino"> <addon id="plugin.video.torrenter" name="Torrenter" version="2.6.2" provider-name="DiMartino">
<requires> <requires>
<import addon="xbmc.python" version="2.1.0"/> <import addon="xbmc.python" version="2.1.0"/>
<import addon="script.module.libtorrent"/> <import addon="script.module.libtorrent"/>

View File

@ -1,5 +1,8 @@
English changelog at http://bit.ly/1MfSVUP English changelog at http://bit.ly/1MfSVUP
[B]Version 2.6.1[/B]
[+] Окно Поиска: Использование окна в сторонних плагинах
[B]Version 2.6.0[/B] [B]Version 2.6.0[/B]
[+] Окно Поиска: Полноценный релиз [+] Окно Поиска: Полноценный релиз
[+] Настройки: Добавлена возможность отключения уведомлений [+] Настройки: Добавлена возможность отключения уведомлений

View File

@ -1072,7 +1072,10 @@ class WatchedHistoryDB:
return x if x else None return x if x else None
def add(self, filename, foldername = None, seek = 0, length = 1, ind = 0, size = 0): def add(self, filename, foldername = None, seek = 0, length = 1, ind = 0, size = 0):
try:
watchedPercent = int((float(seek) / float(length)) * 100) watchedPercent = int((float(seek) / float(length)) * 100)
except:
watchedPercent = 0
max_history_add = int(__settings__.getSetting('max_history_add')) max_history_add = int(__settings__.getSetting('max_history_add'))
if self.history_bool and watchedPercent <= max_history_add: if self.history_bool and watchedPercent <= max_history_add:
self._connect() self._connect()