Edit custom library path with keyboard
This commit is contained in:
		
							parent
							
								
									64f11899a2
								
							
						
					
					
						commit
						cea4adbd41
					
				@ -1,5 +1,5 @@
 | 
			
		||||
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
 | 
			
		||||
<addon id='script.module.libtorrent' version='0.6.19k' name='LibTorrent' provider-name='DiMartino, srg70, RussakHH'>
 | 
			
		||||
<addon id='script.module.libtorrent' version='0.16.19' name='LibTorrent' provider-name='DiMartino, srg70, RussakHH'>
 | 
			
		||||
  <requires>
 | 
			
		||||
    <import addon='xbmc.python' version='2.1.0'/>
 | 
			
		||||
  </requires>
 | 
			
		||||
 | 
			
		||||
@ -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:
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										13
									
								
								default.py
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								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)
 | 
			
		||||
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)
 | 
			
		||||
@ -5,7 +5,7 @@
 | 
			
		||||
	<string id="1002">Custom path to library</string>
 | 
			
		||||
	<string id="1003">Disable automatic system detection</string>
 | 
			
		||||
	<string id="1004">Use library for</string>
 | 
			
		||||
	<string id="1005"></string>
 | 
			
		||||
	<string id="1005">Edit path with keyboard (on run)</string>
 | 
			
		||||
	<string id="1006"></string>
 | 
			
		||||
	
 | 
			
		||||
	<string id="1100">Windows 32-bit, 64-bit</string>
 | 
			
		||||
 | 
			
		||||
@ -5,7 +5,7 @@
 | 
			
		||||
	<string id="1002">Путь к библиотеке</string>
 | 
			
		||||
	<string id="1003">Отключить автоматическое определение системы</string>
 | 
			
		||||
	<string id="1004">Библиотека для</string>
 | 
			
		||||
	<string id="1005"></string>
 | 
			
		||||
	<string id="1005">Отредактировать путь клавиатурой (при запуске)</string>
 | 
			
		||||
	<string id="1006"></string>
 | 
			
		||||
	
 | 
			
		||||
	<string id="1150">Пиры:%s Скорость:%s</string>
 | 
			
		||||
 | 
			
		||||
@ -3,6 +3,7 @@
 | 
			
		||||
 <category label="1000">
 | 
			
		||||
  <setting id="custom_dirname" type="bool" label="1001" default="false" />
 | 
			
		||||
  <setting id="dirname" type="folder" label="1002" enable="eq(-1,true)" />
 | 
			
		||||
  <setting id="ask_dirname" type="bool" label="1005" default="false" />
 | 
			
		||||
  <setting id="custom_system" type="bool" label="1003" default="false" />
 | 
			
		||||
  <setting id="set_system"  type="enum" label="1004" enable="eq(-1,true)" default="0" lvalues="1100|1101|1102|1103|1104|1105|1106|1107|1108|1109"/>
 | 
			
		||||
 </category>
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user