diff --git a/Anteoloader.py b/Anteoloader.py
index 2cdcf2e..62ffa62 100644
--- a/Anteoloader.py
+++ b/Anteoloader.py
@@ -287,8 +287,15 @@ class AnteoPlayer(xbmc.Player):
break
log('[AnteoPlayer]: ************************************* GO NEXT?')
if self.next_dl and self.next_contentId != False and isinstance(self.next_contentId, int) and self.iterator == 100:
+ if not self.next_play:
+ xbmc.sleep(3000)
+ if not xbmcgui.Dialog().yesno(
+ self.localize('Torrent2HTTP'),
+ self.localize('Would you like to play next episode?')):
+ break
self.contentId = self.next_contentId
continue
+
log('[AnteoPlayer]: ************************************* NO! break')
break
@@ -336,9 +343,9 @@ class AnteoPlayer(xbmc.Player):
#dht_routers=None, trackers=None)
encryption = Encryption.ENABLED if self.__settings__.getSetting('encryption') == 'true' else Encryption.DISABLED
- upload_limit = int(self.__settings__.getSetting("upload_limit"))*1024 if self.__settings__.getSetting(
+ upload_limit = int(self.__settings__.getSetting("upload_limit"))*1024/8 if self.__settings__.getSetting(
"upload_limit") != "" else 0
- download_limit = int(self.__settings__.getSetting("download_limit"))*1024 if self.__settings__.getSetting(
+ download_limit = int(self.__settings__.getSetting("download_limit"))*1024/8 if self.__settings__.getSetting(
"download_limit") != "" else 0
if self.__settings__.getSetting("connections_limit") not in ["",0,"0"]:
@@ -373,7 +380,7 @@ class AnteoPlayer(xbmc.Player):
keep_files=keep_files, user_agent=user_agent, resume_file=resume_file)
def buffer(self):
- self.pre_buffer_bytes = 30*1024*1024 #30 MB
+ #self.pre_buffer_bytes = 30*1024*1024 #30 MB
ready = False
progressBar = xbmcgui.DialogProgress()
progressBar.create(self.localize('Please Wait'),
@@ -412,9 +419,6 @@ class AnteoPlayer(xbmc.Player):
speedsText = '%s: %d Mbit/s; %s: %d Mbit/s' % (
self.localize('Downloading'), int(getDownloadRate),
self.localize('Uploading'), int(getUploadRate))
- #if self.debug:
- # peersText=peersText + ' ' + self.torrent.get_debug_info('dht_state')
- # dialogText=dialogText.replace(self.localize('Preloaded: '),'') + ' ' + self.torrent.get_debug_info('trackers_sum')
progressBar.update(iterator, self.localize('Seeds searching.') + peersText, dialogText,
speedsText)
@@ -450,7 +454,8 @@ class AnteoPlayer(xbmc.Player):
self.next_dl = True
else:
self.next_dl = False
- log('[AnteoPlayer]: nextdl - %s, ids_video - %s' % (str(self.next_dl), str(self.ids_video)))
+ self.next_play = self.__settings__.getSetting('next_play') == 'true'
+ log('[AnteoPlayer]: next_dl - %s, next_play - %s, ids_video - %s' % (str(self.next_dl), str(self.next_play), str(self.ids_video)))
def setup_play(self):
file_status = self.engine.file_status(self.contentId)
diff --git a/Core.py b/Core.py
index 1b1e92e..09597e5 100644
--- a/Core.py
+++ b/Core.py
@@ -489,6 +489,12 @@ class Core:
xbmc.executebuiltin('Container.Refresh')
showMessage(self.localize('Search History'), self.localize('Added!'))
+ if action2 == 'edit':
+ db.delete(addtime)
+ title = get('title')
+ showMessage(self.localize('Search History'), self.localize('Deleted!'))
+ xbmc.executebuiltin('XBMC.ActivateWindow(Videos,%s)' % (sys.argv[0] + '?action=%s&action2=%s&%s=%s') % ('search', '&showKey=true', 'url', title))
+
if action2 == 'delete':
db.delete(addtime)
xbmc.executebuiltin('Container.Refresh')
@@ -532,6 +538,8 @@ class Core:
contextMenu.append((self.localize('Add to %s') % self.localize('Favourites SH'),
ListString % ('History', 'fav', 'addtime', str(addtime)),))
img = self.ROOT + '/icons/unfav.png'
+ contextMenu.append((self.localize('Edit'),
+ ListString % ('History', 'edit', 'addtime='+str(addtime)+'&title', urllib.quote_plus(title))))
contextMenu.append((self.localize('Delete from %s') % self.localize('Search History'),
ListString % ('History', 'delete', 'addtime', str(addtime))))
diff --git a/Libtorrent.py b/Libtorrent.py
index 9b009c8..6925986 100644
--- a/Libtorrent.py
+++ b/Libtorrent.py
@@ -31,7 +31,7 @@ import xbmc
import xbmcgui
import xbmcvfs
import Localization
-from functions import file_encode, isSubtitle, DownloadDB, log, debug, is_writable
+from functions import file_encode, isSubtitle, DownloadDB, log, debug, is_writable, vista_check, windows_check
from platform_pulsar import get_platform
class Libtorrent:
@@ -45,6 +45,7 @@ class Libtorrent:
threadComplete = False
lt = None
save_resume_data = None
+ __settings__ = sys.modules["__main__"].__settings__
def __init__(self, storageDirectory='', torrentFile='', torrentFilesDirectory='torrents'):
self.platform = get_platform()
@@ -74,7 +75,7 @@ class Libtorrent:
except Exception, e:
log('Error importing from system. Exception: ' + str(e))
- xbmcgui.Dialog().ok(Localization.localize('Python-Libtorrent Not Found'),
+ xbmcgui.Dialog().ok(Localization.localize('python-libtorrent Not Found'),
Localization.localize(self.platform["message"][0]),
Localization.localize(self.platform["message"][1]))
return
@@ -352,14 +353,7 @@ class Libtorrent:
except:
log('listen_on(6881, 6891) error')
- #tribler example never tested
- #self.session.set_severity_level(self.lt.alert.severity_levels.info)
- #self.session.add_extension("ut_pex")
- #self.session.add_extension("lt_trackers")
- #self.session.add_extension("metadata_transfer")
- #self.session.add_extension("ut_metadata")
- # Ban peers that sends bad data
- #self.session.add_extension("smart_ban")
+ pc_config = int(self.__settings__.getSetting('pc_config'))
# Session settings
try:
@@ -367,12 +361,26 @@ class Libtorrent:
#
session_settings['announce_to_all_tiers'] = True
session_settings['announce_to_all_trackers'] = True
- session_settings['connection_speed'] = 100
session_settings['peer_connect_timeout'] = 2
session_settings['rate_limit_ip_overhead'] = True
session_settings['request_timeout'] = 1
- session_settings['torrent_connect_boost'] = 100
+ session_settings['torrent_connect_boost'] = 50
session_settings['user_agent'] = 'uTorrent/2200(24683)'
+ if pc_config == 0:
+ #good pc
+ session_settings['connections_limit'] = 200
+ session_settings['unchoke_slots_limit'] = 10
+ session_settings['connection_speed'] = 200
+ session_settings['file_pool_size'] = 40
+ elif pc_config == 1:
+ #bad pc/router
+ session_settings['connections_limit'] = 100
+ session_settings['half_open_limit'] = (lambda: windows_check() and
+ (lambda: vista_check() and 4 or 8)() or 50)()
+ session_settings['unchoke_slots_limit'] = 4
+ session_settings['connection_speed'] = 100
+ session_settings['file_pool_size'] = 40
+
#session_settings['cache_size'] = 0
#session_settings['use_read_cache'] = False
diff --git a/Localization.py b/Localization.py
index 0631d07..2519487 100644
--- a/Localization.py
+++ b/Localization.py
@@ -244,7 +244,7 @@ def localize(text):
'Rating:':'דירוג:',
'Information not found!':'המידע לא נמצא',
'Choose searcher':'בחר טראקר',
- 'Python-Libtorrent Not Found':'לא נמצא',
+ 'python-libtorrent Not Found':'לא נמצא',
'Windows has static compiled python-libtorrent included.':'לליבטורנט יש קובץ התקנה עבור ווינדוס',
'You should install "script.module.libtorrent" from "MyShows.me Kodi Repo"':'נא להתקין את הקובץ script.module.libtorrent. מתוך הריפו',
'Linux x64 has not static compiled python-libtorrent included.':'Linux x64 has not static compiled python-libtorrent included.',
@@ -503,7 +503,7 @@ def localize(text):
'Rating:':'Рейтинг:',
'Information not found!':'Информация не найдена!',
'Choose searcher':'Выберите трекер',
- 'Python-Libtorrent Not Found':'Python-Libtorrent не найден',
+ 'python-libtorrent Not Found':'python-libtorrent не найден',
'Windows has static compiled python-libtorrent included.':'На Windows при установке из репозитория к плагину идет python-libtorrent.',
'You should install "script.module.libtorrent" from "MyShows.me Kodi Repo"':'Установите "script.module.libtorrent" из "MyShows.me Kodi Repo"',
'Linux x64 has not static compiled python-libtorrent included.':'На Linux x64 не смогли собрать статическую python-libtorrent',
@@ -548,6 +548,8 @@ def localize(text):
'Seeking is working only with player Torrent2HTTP.':'Перемотка работает только с плеером Torrent2HTTP.',\
'Play (from %s)':'Играть (c %s)',
'Play (from start)':'Играть (с начала)',
+ 'Edit':'Редактировать',
+ 'Would you like to play next episode?':'Проиграть следующий эпизод?',
},
'uk': {
@@ -760,7 +762,7 @@ def localize(text):
'Rating:':'Рейтинг:',
'Information not found!':'Інформація не знайдена!',
'Choose searcher':'Оберіть трекер',
- 'Python-Libtorrent Not Found':'Python-Libtorrent не знайдено',
+ 'python-libtorrent Not Found':'python-libtorrent не знайдено',
'Windows has static compiled python-libtorrent included.':'На Windows при встановленні з репозиторію разом з плагіном йде python-libtorrent.',
'You should install "script.module.libtorrent" from "MyShows.me Kodi Repo"':'Встановіть "script.module.libtorrent" з "MyShows.me Kodi Repo"',
'Linux x64 has not static compiled python-libtorrent included.':'На Linux x64 не змогли зібрати статичну версію python-libtorrent',
diff --git a/Player.py b/Player.py
index cf78177..5eef40d 100644
--- a/Player.py
+++ b/Player.py
@@ -170,6 +170,13 @@ class TorrentPlayer(xbmc.Player):
break
debug('************************************* GO NEXT?')
if self.next_dl and self.next_dling and isinstance(self.next_contentId, int) and self.iterator == 100:
+ if not self.next_play:
+ xbmc.sleep(3000)
+ if not xbmcgui.Dialog().yesno(
+ self.localize('python-libtorrent'),
+ self.localize('Would you like to play next episode?'),
+ self.display_name):
+ break
self.contentId = self.next_contentId
continue
debug('************************************* NO! break')
@@ -192,7 +199,8 @@ class TorrentPlayer(xbmc.Player):
def init(self):
self.next_dl = True if self.__settings__.getSetting('next_dl') == 'true' and self.ids_video else False
- log('[TorrentPlayer]: init - ' + str(self.next_dl))
+ self.next_play = self.__settings__.getSetting('next_play') == 'true'
+ log('[TorrentPlayer]: init - ' + str(self.next_dl)+ str(self.next_play))
self.next_contentId = False
self.display_name = ''
self.downloadedSize = 0
diff --git a/changelog.txt b/changelog.txt
index 7a52d6a..ec5dd59 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -1,5 +1,11 @@
English changelog at http://bit.ly/1MfSVUP
+[B]Version 2.4.4[/B]
+[+] Кнопка редатировать в Истории Поиска
+[+] Переключатель автоматического запуска следующего эпизода
+[+] Исправлено ограничение скорости Torrent2HTTP, которое на самом деле измерялось в MB/s, а не Mbit/s
+[+] Настройки для девайсов/ПК разной мощности у python-libtorrent
+
[B]Version 2.4.3[/B]
[+] Добавлена поддержка торрент-клиента qBittorent
@@ -10,7 +16,7 @@
[+] Плеер Torrent2HTTP от anteo теперь по-умолчанию для новых пользователей
[B]Version 2.4.0[/B]
-[+] Удален плеер BTclient
+[-] Удален плеер BTclient
[+] Добавлен плеер Torrent2HTTP от anteo
[B]Version 2.3.8[/B]
diff --git a/resources/language/English/strings.xml b/resources/language/English/strings.xml
index a7c2c25..92fa7c2 100644
--- a/resources/language/English/strings.xml
+++ b/resources/language/English/strings.xml
@@ -18,7 +18,7 @@
Confluence (by DiMartino)
Confluence (by RussakHH)
Enable Search History
- Python-Libtorrent
+ python-libtorrent
Ace Stream
P2P Player
Rest Settings in Programms - AceStream Client
@@ -35,7 +35,7 @@
Open Torrent File
Open Context Menu
Download via Torrent-client
- Download via Python-Libtorrent
+ Download via python-libtorrent
Sort search results by seeds
Custom search option phrase
Encryption
@@ -52,6 +52,10 @@
Use random ports
Port for incoming connections
Pre-buffer amount before start playing, Mb
+ Autoplay next episode (or ask)
+ Device configuration
+ Average/Good PC
+ Below average PC/router
Interface
P2P Network
Advanced
@@ -78,4 +82,5 @@
You don't have external searcher. Please install it first.
+
diff --git a/resources/language/Hebrew/strings.xml b/resources/language/Hebrew/strings.xml
index fb0adcc..bcbb23b 100644
--- a/resources/language/Hebrew/strings.xml
+++ b/resources/language/Hebrew/strings.xml
@@ -18,7 +18,7 @@
Confluence (by DiMartino)
Confluence (by RussakHH)
אפשר היסטוריית חיפוש
- Python-Libtorrent (מומלץ)
+ python-libtorrent (מומלץ)
Ace Stream (ללא מגנטים)
נגן P2P
איפוס הגדרות של תוכניות - AceStream
@@ -35,7 +35,7 @@
פתח קובץ טורנט
פתח תפריט הקשר
הורד באמצעות טורנט
- הורד באמצעות Python-Libtorrent
+ הורד באמצעות python-libtorrent
מיין תוצאות חיפוש על ידי זרעים
חיפוש מותאם אישית
הצפנה
diff --git a/resources/language/Russian/strings.xml b/resources/language/Russian/strings.xml
index ad23c8c..d77a57d 100644
--- a/resources/language/Russian/strings.xml
+++ b/resources/language/Russian/strings.xml
@@ -18,7 +18,7 @@
Confluence (от DiMartino)
Confluence (от RussakHH)
Включить Историю Поиска
- Python-Libtorrent
+ python-libtorrent
Ace Stream
P2P Проигрыватель
Остальные настройки в "Программы - AceStream Client"
@@ -35,7 +35,7 @@
Открыть Торрент Файл
Открыть Контекстное меню
Скачать Торрент-клиентом
- Скачать Python-Libtorrent
+ Скачать python-libtorrent
Сортировать поиск по количеству раздающих
Дополнительная фраза в вариантах поиска
Шифрование
@@ -52,6 +52,10 @@
Использовать случайные порты
Порт для входящих соединений
Загружаемый объем файла до начала просмотра, Мб
+ Автоматически проиграть следующий эпизод (или предложить)
+ Конфигурация устройства
+ Нормальный ПК
+ Плохой ПК/роутер
Интерфейс
P2P Сеть
Дополнительные
diff --git a/resources/language/Ukrainian/strings.xml b/resources/language/Ukrainian/strings.xml
index e8cb760..9c31b84 100644
--- a/resources/language/Ukrainian/strings.xml
+++ b/resources/language/Ukrainian/strings.xml
@@ -18,7 +18,7 @@
Confluence (від DiMartino)
Confluence (від RussakHH)
Увімкнути Історію Пошуку
- Python-Libtorrent (рекомендовано)
+ python-libtorrent (рекомендовано)
Ace Stream (без магнет-посилань)
P2P Програвач
Решта налаштувань в "Програми - AceStream Client"
@@ -35,7 +35,7 @@
Відкрити торрент-файл
Відкрити контекстне меню
Завантажити торрент-клієнтом
- Завантажити за допомогою Python-Libtorrent
+ Завантажити за допомогою python-libtorrent
Сортувати результати пошуку по кількості роздач
Додаткова пошукова фраза в варіантах пошуку
Шифрування
diff --git a/resources/settings.xml b/resources/settings.xml
index 59a7db1..ec1ff8e 100644
--- a/resources/settings.xml
+++ b/resources/settings.xml
@@ -18,18 +18,20 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+