diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 2644b15..f60878e 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,6 +4,12 @@
+
+
+
+
+
+
@@ -91,8 +97,8 @@
-
-
+
+
@@ -121,88 +127,88 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -211,7 +217,7 @@
-
+
@@ -249,11 +255,11 @@
-
+
-
-
+
+
@@ -329,24 +335,18 @@
-
-
+
+
-
-
-
-
-
-
@@ -354,21 +354,11 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -381,7 +371,7 @@
-
+
@@ -419,55 +409,79 @@
-
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -478,20 +492,10 @@
-
-
-
-
-
-
-
-
-
-
-
+
@@ -550,7 +554,6 @@
-
@@ -558,19 +561,20 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
@@ -637,6 +641,68 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -822,12 +888,6 @@
1420801533300
-
- 1450123718595
-
-
- 1450123718596
-
1450188565240
@@ -1116,24 +1176,30 @@
1456851519691
-
+
+ 1456855905709
+
+
+ 1456855905709
+
+
-
+
-
-
+
+
@@ -1186,7 +1252,7 @@
-
+
@@ -1373,14 +1439,6 @@
-
-
-
-
-
-
-
-
@@ -1437,13 +1495,6 @@
-
-
-
-
-
-
-
@@ -1451,30 +1502,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1491,124 +1518,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1619,7 +1528,7 @@
-
+
@@ -1627,7 +1536,7 @@
-
+
@@ -1666,7 +1575,7 @@
-
+
@@ -1693,79 +1602,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1819,10 +1655,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1894,5 +1750,214 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Core.py b/Core.py
index dff60a5..ae3b8b6 100644
--- a/Core.py
+++ b/Core.py
@@ -242,7 +242,24 @@ class Core:
def test(self, params={}):
#from Anteoloader import AnteoPlayer
- #torrentUrl='D:\\test.torrent'
+ #from python_libtorrent import get_libtorrent
+ #self.lt=get_libtorrent()
+ #self.torrentFile='D:\\test.torrent'
+ #self.session = self.lt.session()
+ #e=self.lt.bdecode(xbmcvfs.File(self.torrentFile,'rb').read())
+ #self.torrentFileInfo = self.lt.torrent_info(e)
+ #torrent_info={'ti': self.torrentFileInfo,
+ # 'save_path': self.userStorageDirectory,
+ # 'flags': 0x300,
+ # #'storage_mode': self.lt.storage_mode_t(1),
+ # 'paused': False,
+ # #'auto_managed': False,
+ # #'duplicate_is_error': True
+ # }
+ #self.torrentHandle = self.session.add_torrent(torrent_info)
+ #log(self.torrentHandle.torrent_file())
+ #self.session.remove_torrent(self.torrentHandle)
+
#params['url']='0'
#if not xbmcvfs.exists(torrentUrl):
# action = xbmcgui.Dialog()
@@ -258,93 +275,6 @@ class Core:
# xbmc.sleep(1000)
# self.Downloader.__exit__()
#self.Player = AnteoPlayer(userStorageDirectory=self.userStorageDirectory, torrentUrl=torrentUrl, params=params)
- log('userStorageDirectory - '+(self.userStorageDirectory))
- log('is_writable - '+str(is_writable(self.userStorageDirectory)))
-
-
- log('getsize - '+str(os.path.getsize(self.userStorageDirectory)))
-
- log('getDirectorySizeInBytes - '+str(getDirectorySizeInBytes(self.userStorageDirectory)))
- log('getDirectorySizeInGB - '+str(getDirectorySizeInGB(self.userStorageDirectory)))
-
- import stat
-
- try:
- log(os.popen("DIR").read())
- except Exception, e:
- log('lol didnt work')
- log(str(e))
-
- try:
- log(os.popen("cd %s; ls -la" % os.path.dirname(self.userStorageDirectory)).read())
- except Exception, e:
- log('lol didnt work2')
- log(str(e))
-
- try:
- log(os.popen("cd %s; ls -la" % self.userStorageDirectory).read())
- except Exception, e:
- log('lol didnt work3')
- log(str(e))
-
- try:
- log(os.popen("id; chmod 777 %s" % self.userStorageDirectory).read())
- except Exception, e:
- log('lol didnt work3')
- log(str(e))
-
- #try:
- # log(os.popen("cd %s; df -h" % self.userStorageDirectory).read())
- #except Exception, e:
- # log('lol didnt work2')
- # log(str(e))
-
- try:
- log(str(os.path.isdir(self.userStorageDirectory)))
- except Exception, e:
- log(str(e))
- try:
- log(str(os.path.exists(self.userStorageDirectory)))
- except Exception, e:
- log(str(e))
- try:
- log(str(os.listdir(self.userStorageDirectory)))
- except Exception, e:
- log(str(e))
- try:
- log(str(os.listdir(os.path.dirname(self.userStorageDirectory))))
- except Exception, e:
- log(str(e))
- try:
- os.makedirs(os.path.join(self.userStorageDirectory, 'xtorrents'))
- except Exception, e:
- log(str(e))
- try:
- os.chmod(os.path.dirname(self.userStorageDirectory), stat.S_IWOTH)
- except Exception, e:
- log(str(e))
- try:
- os.chmod(self.userStorageDirectory, stat.S_IWOTH)
- except Exception, e:
- log(str(e))
- try:
- log(str(os.path.isdir(self.userStorageDirectory)))
- except Exception, e:
- log(str(e))
- try:
- log(os.popen("cd %s; ls -la" % os.path.dirname(self.userStorageDirectory)).read())
- torrentFile = os.path.join(self.userStorageDirectory, 'shiiiiit')
- localFile = xbmcvfs.File(torrentFile, "w+b")
- localFile.write('HELLO')
- localFile.close()
- except Exception, e:
- log('lol didnt work2')
- log(str(e))
- try:
- log(str(os.listdir(self.userStorageDirectory)))
- except Exception, e:
- log(str(e))
-
xbmcgui.Dialog().ok('Dam Son!','Now send this shit to DiMartino')
diff --git a/addon.xml b/addon.xml
index e64c5d8..d697a6f 100644
--- a/addon.xml
+++ b/addon.xml
@@ -1,5 +1,5 @@
-
+
diff --git a/changelog.txt b/changelog.txt
index 021ee0a..edb5c2b 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -3,6 +3,7 @@
[B]Version 2.4.6[/B]
[+] Проигрыватель: Уменьшена просадка после загрузки буфера (спасибо srg70 и RussakHH)
[+] История Просмотров: Добавлено имя раздачи, тонкая настройка добавления по проценту просмотра
+[+] API: Внешние управление из любого плагина
[B]Version 2.4.5[/B]
[+] Дополнительна секция настроек со специфическими опциями
diff --git a/functions.py b/functions.py
index 6909029..ed2753a 100644
--- a/functions.py
+++ b/functions.py
@@ -572,7 +572,7 @@ def view_style(func):
styles['sectionMenu'] = styles['Seasons'] = 'list'
styles['uTorrentBrowser'] = styles['torrentPlayer'] = styles['openTorrent'] = 'wide'
styles['showFilesList'] = styles['DownloadStatus'] = 'wide'
- elif view_style in [1, 4]:
+ elif view_style in [1, 4, 5]:
styles['searchOption'] = 'info'
styles['drawContent'] = styles['torrentPlayer'] = styles['openTorrent'] = styles['drawtrackerList'] = 'info'
styles['uTorrentBrowser'] = styles['History'] = styles['DownloadStatus'] = 'wide'
@@ -583,8 +583,13 @@ def view_style(func):
styles['uTorrentBrowser'] = styles['torrentPlayer'] = 'wide'
styles['openTorrent'] = styles['History'] = styles['DownloadStatus'] = 'wide'
styles['sectionMenu'] = 'icons'
+ elif view_style == 5:
+ styles['uTorrentBrowser'] = styles['torrentPlayer'] = 'wide'
+ styles['openTorrent'] = styles['History'] = styles['DownloadStatus'] = 'wide'
+ styles['drawtrackerList'] = styles['drawContent'] = styles['List'] = styles['sectionMenu'] = 'icons'
+ styles['searchOption'] = 'info'
- if view_style in [1, 3, 4]:
+ if view_style in [1, 3, 4, 5]:
num_skin = 0
elif view_style == 2:
num_skin = 1
diff --git a/resources/language/English/strings.xml b/resources/language/English/strings.xml
index e8c0a45..5f701af 100644
--- a/resources/language/English/strings.xml
+++ b/resources/language/English/strings.xml
@@ -63,6 +63,7 @@
Do not sort
by Name
Do not add to Watched History if played more (%)
+ Confluence (by safonov_ivan)
Interface
P2P Network
Advanced
diff --git a/resources/language/Russian/strings.xml b/resources/language/Russian/strings.xml
index b8d272c..8b6209a 100644
--- a/resources/language/Russian/strings.xml
+++ b/resources/language/Russian/strings.xml
@@ -63,6 +63,7 @@
Не сортировать
по Имени
Не добавлять в История Просмотров если больше (%)
+ Confluence (от safonov_ivan)
Интерфейс
P2P Сеть
Дополнительные
diff --git a/resources/settings.xml b/resources/settings.xml
index 42a1d8c..476de05 100644
--- a/resources/settings.xml
+++ b/resources/settings.xml
@@ -4,7 +4,7 @@
-
+