diff --git a/addon.xml b/addon.xml index 96579bc..1ba39c5 100644 --- a/addon.xml +++ b/addon.xml @@ -1,5 +1,5 @@ - + diff --git a/changelog.txt b/changelog.txt index b73b3e6..c624cc7 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,7 @@ -0.6.19k: +0.16.19k: +Edit custom library path with keyboard + +0.6.19k: Added custom library path 0.6.19c: diff --git a/default.py b/default.py index 8de6e12..b2c3fe5 100644 --- a/default.py +++ b/default.py @@ -2,6 +2,7 @@ from python_libtorrent import get_libtorrent, get_platform, log import xbmcgui +import xbmcaddon, xbmc sucsess=False version='' @@ -19,4 +20,14 @@ except Exception, e: line2='python-libtorrent %s IMPORTED successfully' % version if sucsess else 'Failed to import python-libtorrent!' -dialog.ok('Libtorrent','OS:'+p['os']+' arch:'+p['arch'], line2) \ No newline at end of file +dialog.ok('Libtorrent','OS:'+p['os']+' arch:'+p['arch'], line2) + +__settings__ = xbmcaddon.Addon(id='script.module.libtorrent') +__language__ = __settings__.getLocalizedString +if __settings__.getSetting('ask_dirname')=='true': + set_dirname=__settings__.getSetting('dirname') + keyboard = xbmc.Keyboard(set_dirname, __language__(1002)) + keyboard.doModal() + path_keyboard = keyboard.getText() + if path_keyboard and keyboard.isConfirmed(): + __settings__.setSetting('dirname', path_keyboard) \ No newline at end of file diff --git a/resources/language/english/strings.xml b/resources/language/english/strings.xml index 658b13d..daed105 100644 --- a/resources/language/english/strings.xml +++ b/resources/language/english/strings.xml @@ -5,7 +5,7 @@ Custom path to library Disable automatic system detection Use library for - + Edit path with keyboard (on run) Windows 32-bit, 64-bit diff --git a/resources/language/russian/strings.xml b/resources/language/russian/strings.xml index a64e567..b0fbaf3 100644 --- a/resources/language/russian/strings.xml +++ b/resources/language/russian/strings.xml @@ -5,7 +5,7 @@ Путь к библиотеке Отключить автоматическое определение системы Библиотека для - + Отредактировать путь клавиатурой (при запуске) Пиры:%s Скорость:%s diff --git a/resources/settings.xml b/resources/settings.xml index 523d688..1ae6a96 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -3,6 +3,7 @@ +