• 1
  • 8
  • 9
  • 10(current)
  • 11
  • 12
  • 42
Release GlobalSearch Script
pre-frodo version for nightly xbmc builds:
script.globalsearch-1.0.0.zip
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
OK This is interesting. Some of the below might not be the Global Search's fault btw.

Key fact: I'm using the Motorola NYXBoard. It's effectively 'just a USB keyboard' however one of its very useful functions is that if you are in 'normal remote mode' and flip the device over to switch it to keyboard mode, it opens a search dialog on XBMC! Nice! (under the hood, I think/assume the keyboard sends a 'search button' keypress to XBMC)

This dialog works fine inside a category, for example inside Videos searching for 'star' will get me 'star trek', however I believe it's not your Globalsearch, the interface looks more standard.

Secondly, in the main home menu, if I flip the keyboard, I get the search dialog, but whatever I type, there is nothing found. Perhaps this is a generic XBMC bug.

Thirdly I don't have a way inside the main home menu to access your search. There's no main menu item.

Finally, if I go to programs, then manually launch global search, I see a search dialog.. but then if I flip over the keyboard (presumably 'hitting search button again') I see the search dialog blink. If I type something I get 'no results found' and if I then hit OK, your search starts (and works as normal)


Reply
Some more info:

Here I am in the main menu, flip to keyboard side, type 'test', and hit enter, then hit enter to exit out of the 'Searching... no results found' dialog.

Code:
00:56:18 T:3016255808   DEBUG: SDLKeyboard: scancode: 49, sym: 0120, unicode: 0000, modifier: 0
00:56:18 T:3016255808   DEBUG: LookupSymAndUnicode - switched to keyboard side
00:56:18 T:3016255808   DEBUG: LookupSymAndUnicode - executing command 'XBMC.VideoLibrary.Search'
00:56:18 T:3016255808   DEBUG: ExecuteXBMCAction : Translating XBMC.VideoLibrary.Search
00:56:18 T:3016255808   DEBUG: ExecuteXBMCAction : To XBMC.VideoLibrary.Search
00:56:18 T:3016255808    INFO: Loading skin file: DialogKeyboard.xml
00:56:18 T:3016255808   DEBUG: ------ Window Init (DialogKeyboard.xml) ------
00:56:23 T:3016255808   DEBUG: SDLKeyboard: scancode: 1c, sym: 0074, unicode: 0074, modifier: 0
00:56:23 T:3016255808   DEBUG: OnKey: t (f054) pressed, trying keyboard action 61812
00:56:23 T:3016255808   DEBUG: SDLKeyboard: scancode: 1a, sym: 0065, unicode: 0065, modifier: 0
00:56:23 T:3016255808   DEBUG: OnKey: e (f045) pressed, trying keyboard action 61797
00:56:24 T:3016255808   DEBUG: SDLKeyboard: scancode: 27, sym: 0073, unicode: 0073, modifier: 0
00:56:24 T:3016255808   DEBUG: OnKey: s (f053) pressed, trying keyboard action 61811
00:56:24 T:3016255808   DEBUG: SDLKeyboard: scancode: 1c, sym: 0074, unicode: 0074, modifier: 0
00:56:24 T:3016255808   DEBUG: OnKey: t (f054) pressed, trying keyboard action 61812
00:56:26 T:3016255808   DEBUG: SDLKeyboard: scancode: 24, sym: 000d, unicode: 000d, modifier: 0
00:56:26 T:3016255808   DEBUG: OnKey: return (f00d) pressed, trying keyboard action 61453
00:56:27 T:3016255808   DEBUG: ------ Window Deinit (DialogKeyboard.xml) ------
00:56:27 T:3016255808    INFO: Loading skin file: DialogProgress.xml
00:56:27 T:3016255808   DEBUG: DialogProgress::StartModal called
00:56:27 T:3016255808   DEBUG: ------ Window Init (DialogProgress.xml) ------
00:56:27 T:3016255808    INFO: Loading skin file: DialogOK.xml
00:56:27 T:3016255808 WARNING: CreateFile, successfuly opened </storage/.xbmc/addons/skin.metropolis/720p/DialogOk.xml> instead of </storage/.xbmc/addons/skin.metropolis/720p/DialogOK.xml>
00:56:27 T:3016255808   DEBUG: ------ Window Init (DialogOK.xml) ------
00:56:27 T:3016255808   DEBUG: ------ Window Deinit (DialogProgress.xml) ------
00:56:35 T:3016255808   DEBUG: SDLKeyboard: scancode: 24, sym: 000d, unicode: 000d, modifier: 0
00:56:35 T:3016255808   DEBUG: OnKey: return (f00d) pressed, action is Select
00:56:35 T:3016255808   DEBUG: ExecuteXBMCAction : Translating PreviousMenu
00:56:35 T:3016255808   DEBUG: ExecuteXBMCAction : To PreviousMenu
00:56:35 T:3016255808   DEBUG: ------ Window Deinit (DialogOK.xml) ------
00:56:35 T:3016255808   DEBUG: ProcessKeyDown - keypress translated by a HID peripheral
00:56:35 T:3016255808   DEBUG: GetActionCode: Trying Hardy keycode for 0xf200
00:56:35 T:3016255808   DEBUG: Previous line repeats 3 times.
00:56:35 T:3016255808   DEBUG: OnKey: 0 (f200) pressed, action is

And this is from the moment I hit 'OK' on the globalsearch icon in 'Add-ons'

Code:
01:00:47 T:3016255808   DEBUG: OnKey: return (f00d) pressed, action is Select
01:00:47 T:3016255808    INFO: initializing python engine.
01:00:47 T:3016255808   DEBUG: new python thread created. id=12
01:00:47 T:2939157312  NOTICE: Thread XBPyThread start, auto delete: false
01:00:47 T:2939157312   DEBUG: Python thread: start processing
01:00:47 T:2939157312  NOTICE: -->Python Interpreter Initialized<--
01:00:47 T:2939157312   DEBUG: Process - The source file to load is /storage/.xbmc/addons/script.globalsearch/default.py
01:00:47 T:2939157312   DEBUG: Process - Setting the Python path to /storage/.xbmc/addons/script.globalsearch:/storage/.xbmc/addons/script.module.xbmcswift/lib:/storage/.xbmc/addons/script.module.simplejson/lib:/storage/.xbmc/addons/scri
pt.module.beautifulsoup/lib:/storage/.xbmc/addons/script.common.plugin.cache/lib:/storage/.xbmc/addons/script.module.simple.downloader/lib:/storage/.xbmc/addons/script.module.parsedom/lib:/storage/.xbmc/addons/script.module.elementtree/l
ib:/usr/lib/python27.zip:/usr/lib/python2.7:/usr/lib/python2.7/plat-linux2:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload:/usr/lib/python2.7/site-packages:/usr/lib/python2.7/site-packages/PIL:/usr/lib
/python2.7/site-packages/gtk-2.0:
01:00:47 T:2939157312   DEBUG: Process - Entering source directory /storage/.xbmc/addons/script.globalsearch
01:00:47 T:2939157312   DEBUG: Instantiating addon using automatically obtained id of "script.globalsearch" dependent on version 2.0 of the xbmc.python api
01:00:48 T:2939157312    INFO: Loading skin file: DialogKeyboard.xml
01:00:48 T:3016255808   DEBUG: ------ Window Init (DialogKeyboard.xml) ------
01:01:02 T:3016255808   DEBUG: SDLKeyboard: scancode: 1c, sym: 0074, unicode: 0074, modifier: 0
01:01:02 T:3016255808   DEBUG: OnKey: t (f054) pressed, trying keyboard action 61812
01:01:03 T:3016255808   DEBUG: SDLKeyboard: scancode: 1a, sym: 0065, unicode: 0065, modifier: 001:01:03 T:3016255808   DEBUG: OnKey: e (f045) pressed, trying keyboard action 6179701:01:03 T:3016255808   DEBUG: SDLKeyboard: scancode: 27, sym: 0073, unicode: 0073, modifier: 0
01:01:03 T:3016255808   DEBUG: OnKey: s (f053) pressed, trying keyboard action 61811
01:01:04 T:3016255808   DEBUG: SDLKeyboard: scancode: 1c, sym: 0074, unicode: 0074, modifier: 0
01:01:04 T:3016255808   DEBUG: OnKey: t (f054) pressed, trying keyboard action 6181201:01:06 T:3016255808   DEBUG: SDLKeyboard: scancode: 24, sym: 000d, unicode: 000d, modifier: 001:01:06 T:3016255808   DEBUG: OnKey: return (f00d) pressed, trying keyboard action 61453
01:01:07 T:3016255808   DEBUG: ------ Window Deinit (DialogKeyboard.xml) ------
01:01:07 T:2939157312   DEBUG: script.globalsearch: script version 1.0.0 started
01:01:07 T:3016255808   DEBUG: ------ Window Init (/storage/.xbmc/addons/skin.metropolis/720p/script-globalsearch-main.xml) ------
[/code]
Reply
Final update: OK, after digging into some internals I've figured it out.

In the peripherals menu you can adjust what the 'flip to keyboard' and 'flip to remote' actions do. I reassigned 'flip to keyboard' to
Code:
RunScript(script.globalsearch)
and presto.

2 questions:

1/ I have a large library and the script is a bit slow (takes, say, 10 seconds to find everything). Are there ways to speed this up? For example: My D2700 CPU has 4 cores (hyperthreading dualcore), can't we run one sub-search per core? One core searching my Videos, one core searching my Music, the two others cheerleading? (or even betterConfusedplit up the music db in 3 bits and search the 3 subparts.)

2/ Parts of the results are slightly garbled. (artist, for example) is shown as M/A/D/O/N/N/A/ ) - this is in the metropolis skin. GlobalSearch or Metropolis' fault?

-M
Reply
(2012-08-23, 11:57)puntloos Wrote: Final update: OK, after digging into some internals I've figured it out.

In the peripherals menu you can adjust what the 'flip to keyboard' and 'flip to remote' actions do. I reassigned 'flip to keyboard' to
Code:
RunScript(script.globalsearch)
and presto.

2 questions:

1/ I have a large library and the script is a bit slow (takes, say, 10 seconds to find everything). Are there ways to speed this up? For example: My D2700 CPU has 4 cores (hyperthreading dualcore), can't we run one sub-search per core? One core searching my Videos, one core searching my Music, the two others cheerleading? (or even betterConfusedplit up the music db in 3 bits and search the 3 subparts.)

2/ Parts of the results are slightly garbled. (artist, for example) is shown as M/A/D/O/N/N/A/ ) - this is in the metropolis skin. GlobalSearch or Metropolis' fault?

-M

1) i know of two things that would speed things up:
- if xbmc would move to python 2.7 (or up) that would speed up the processing of the search results 10x.
- threading... i have not tried it, so can't tell just how much we'd gain from it.


2) never seen that, not even when i test in Metropolis.
what happens if you try the script in Confluence?
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
(2012-08-24, 00:46)ronie Wrote: 1) i know of two things that would speed things up:
- if xbmc would move to python 2.7 (or up) that would speed up the processing of the search results 10x.
- threading... i have not tried it, so can't tell just how much we'd gain from it.
Actually one feature request there too: It would be great if we could choose the item you want while the script is still searching for more..
If I look for artist 'Madonna' it insists on checking songs for madonna before it'll let me..

Quote:2) never seen that, not even when i test in Metropolis.
what happens if you try the script in Confluence?

Same thing.

United Nations
d/a/n/c/e
United Nations are a United Kingdom dance act..

Abezizwa
L/a/d/y/s/m/i/t/h/ /B/l/a/c/k/
A/f/r/i/c/a/n

So with Artists the genre gets garbled, and with songs the artist and genre get garbled

One more question: is there some command one can run to cancel your script and remove the result window? I ask because of my keyboard, it can send a command when I turn away from the 'keyboard mode'. It would be nice if it both closes the keyboard mode and the search result screen (ideally cancelling ongoing searches), if it's there.
Reply
Guys is it possible to search for actors with this?
Reply
v0.2.5 is the last Eden version? If yes, it has a weird bug. If user input a blank search (by mistake maybe) it blocks the interface, escape/backspace key take no effect, you need to force close the XBMC process.
I wish to have Rotten Tomatoes (user+critics) + IMDB both ratings display in skin.
Reply
(2012-09-26, 09:16)tinybutstrong Wrote: v0.2.5 is the last Eden version? If yes, it has a weird bug. If user input a blank search (by mistake maybe) it blocks the interface, escape/backspace key take no effect, you need to force close the XBMC process.

shame on me, i've fixed that bug some time ago,
but never released an update..

will do so in a bit.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
Thanks ronie, problem solved, got the update.
I wish to have Rotten Tomatoes (user+critics) + IMDB both ratings display in skin.
Reply
It appears this great script doesn't like the changes recently made to JSON. Attached debug log. Using Windows 7, XBMC Frodo Alpha 7 build date 2012-10-07.

http://pastebin.com/MB3vwV9Q
Reply
(2012-10-14, 19:56)Sranshaft Wrote: It appears this great script doesn't like the changes recently made to JSON. Attached debug log. Using Windows 7, XBMC Frodo Alpha 7 build date 2012-10-07.

http://pastebin.com/MB3vwV9Q

try v1.0.3 (see first post).
i've just updated the code to reflect the latest json-rpc changes.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
(2012-10-21, 17:09)ronie Wrote: try v1.0.3 (see first post).
i've just updated the code to reflect the latest json-rpc changes.

Thanks for the update mate. With the latest JSON changes it now loads incredibly fast. The only issue I'm having now is the images for anything video related / music artists aren't being displayed.

Using the XBMCSetup-20121023-2924e3e-master Windows build.

Nothing in the debug log reports an error. Upon installing the latest nightly, XBMC asked to refresh the image cache for videos; maybe an image caching issue?

Reply
(2012-10-24, 14:40)Sranshaft Wrote:
(2012-10-21, 17:09)ronie Wrote: try v1.0.3 (see first post).
i've just updated the code to reflect the latest json-rpc changes.

Thanks for the update mate. With the latest JSON changes it now loads incredibly fast. The only issue I'm having now is the images for anything video related / music artists aren't being displayed.

Using the XBMCSetup-20121023-2924e3e-master Windows build.

Nothing in the debug log reports an error. Upon installing the latest nightly, XBMC asked to refresh the image cache for videos; maybe an image caching issue?

thanx for testing :-)

all thumbs show up fine on my end (also tested with a fresh profile / library scan)
fanart images where broken though, i've fixed that in v1.0.4

sadly, this requires a skin update if the skin you're using includes a customized script xml:
ListItem.Property(Fanart_Image) -> ListItem.Property(Fanart)

script.globalsearch-1.0.4.zip
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
Ah yes, I forgot to mention I was using fanarts for the images. That explains why it wasn't working. Cheers mate for the fix, will test it out tonight. Shouldn't be too much of a hassle to update the change.

Edit: Give it a spin and everything is working as expected. Thanks again for the update mate. Much appreciated and the loading speed is brilliant!
Reply
  • 1
  • 8
  • 9
  • 10(current)
  • 11
  • 12
  • 42

Logout Mark Read Team Forum Stats Members Help
GlobalSearch Script1