search fix
parent
f45dd93a57
commit
cb16b0d918
|
@ -132,7 +132,8 @@ class Content:
|
||||||
else:
|
else:
|
||||||
get = self.category_dict[category][subcategory]
|
get = self.category_dict[category][subcategory]
|
||||||
|
|
||||||
if category == 'search': get = (get[0], get[1] % urllib.quote_plus(subcategory.encode('utf-8')))
|
if category == 'search' and subcategory != True:
|
||||||
|
get = (get[0], get[1] % urllib.quote_plus(subcategory.encode('utf-8')))
|
||||||
|
|
||||||
property = self.get_property(category, subcategory)
|
property = self.get_property(category, subcategory)
|
||||||
|
|
||||||
|
@ -173,8 +174,8 @@ class Content:
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
if has_property:
|
if has_property:
|
||||||
if category == 'search': property['page'] = property['page'] % urllib.quote_plus(
|
if category == 'search' and subcategory != True:
|
||||||
subcategory.encode('utf-8'))
|
property['page'] = property['page'] % urllib.quote_plus(subcategory.encode('utf-8'))
|
||||||
return property
|
return property
|
||||||
|
|
||||||
|
|
||||||
|
|
14
Core.py
14
Core.py
|
@ -727,6 +727,19 @@ class Core:
|
||||||
else:
|
else:
|
||||||
if provider:
|
if provider:
|
||||||
self.Content = self.contenterObject[provider]
|
self.Content = self.contenterObject[provider]
|
||||||
|
if category == 'search' and provider and subcategory == True:
|
||||||
|
keyboard = xbmc.Keyboard('', self.localize('Search Phrase') + ':')
|
||||||
|
keyboard.doModal()
|
||||||
|
query = keyboard.getText()
|
||||||
|
if not query:
|
||||||
|
return
|
||||||
|
elif keyboard.isConfirmed():
|
||||||
|
subcategory = query
|
||||||
|
if subcategory:
|
||||||
|
apps['subcategory'] = subcategory
|
||||||
|
else:
|
||||||
|
return
|
||||||
|
|
||||||
if not self.Content.isTracker():
|
if not self.Content.isTracker():
|
||||||
self.draw(apps, mode='content')
|
self.draw(apps, mode='content')
|
||||||
else:
|
else:
|
||||||
|
@ -742,6 +755,7 @@ class Core:
|
||||||
page = apps.get('page') if apps.get('page') else 1
|
page = apps.get('page') if apps.get('page') else 1
|
||||||
sort = apps.get('sort') if apps.get('sort') else 0
|
sort = apps.get('sort') if apps.get('sort') else 0
|
||||||
apps_property={'page':page, 'sort':sort}
|
apps_property={'page':page, 'sort':sort}
|
||||||
|
log('draw: '+str((category, subcategory)))
|
||||||
property = self.Content.get_property(category, subcategory)
|
property = self.Content.get_property(category, subcategory)
|
||||||
contentList = self.Content.get_contentList(category, subcategory, apps_property)
|
contentList = self.Content.get_contentList(category, subcategory, apps_property)
|
||||||
if property and property.get('page'):
|
if property and property.get('page'):
|
||||||
|
|
Loading…
Reference in New Issue