MyMusic search
#1
I would like to write a search engine api available to skins that looks something like this:

User Dialog:
Contains keyboard buttons and textbox.
When the user presses enter, call the search function with the value in the textbox.

Search implementation:
Queries for the current gui state e.i. all, genre, artist, album, etc.
Using the gui state, search the music library for items with that tag for the string given.
Update the gui with the search items.

Questions:
1) Does this api already exist, if so how do I access it from a dialog?
2) If not, can this be done using the python plugin api? (assuming I can access httpapi in the python plugin, which seems to be able to do this?)

Thanks for any advice
Reply
#2
How about you just use the built in search on the left hand side? This can be an edit control - always annoys me that in confluence it isn't.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
jmarshall Wrote:How about you just use the built in search on the left hand side?

Thanks, I use Alaska so that's not an option (that I can find). I actually tried to do word searches and debug log output to try to figure out how Confluence does the search, but I couldn't figure it out. Also, it doesn't do the implementation I describe, it only seems to do "all", i.e. its not "gui state" sensitive.

As I see it, a keymap would start the search dialog from the MyMusic window, which has a "state" i.e. sub library tag folder.
Reply
#4
Why would you want search to be "gui state sensitive"? Surely I shouldn't have to care where I am - if I want to search for "Metallica" then I expect it to give me those results.

Or are you instead after a filter? XBMC does that (using the same technique - there's an edit or button control available) as well.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#5
Ok, I think our semantics might be cross-referencing Smile

personally, I find an advantage in "gui state searching", but perhaps what I really mean is filtering. So... if I design a keyboard dialog, how do I hook it up the way I describe in the "search implementation" above to use the built-in filtering mechanism?
Reply
#6
Examples:

In Genre I search for Rock, that's an easy way to remove electronica, punk, and classical from the Genre view

Additionally, if I'm in Genre view I would expect my search keywords to apply to that context.
Reply
#7
Use the filtering available in the library already - See Filter under Misc options in confluences. This button can be made an editcontrol if you want.

You can also use SMS based filtering via the FilterSMS2 -> FilterSMS9 actions in your keymap.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#8
Thanks so much Jonathon. The SMS features are really cool. It's funny, actually, because I was going to ask about the "Jump" functionality later. This post will discuss SMS as well as the the UI I would like to implement for Jump.

jmarshall Wrote:Use the filtering available in the library already - See Filter under Misc options in confluences. This button can be made an editcontrol if you want.
I haven't yet tried to figure this one out yet, so it will be for another post or another thread.

jmarshall Wrote:You can also use SMS based filtering via the FilterSMS2 -> FilterSMS9 actions in your keymap.
This feature is really cool, here are my findings:

Viewing Library Mode - Music - Albums
Using the following keymap:
Code:
<keymap>
    <musiclibrary>
        <keyboard>
            <two>JumpSMS2</two>
            <three>JumpSMS3</three>
            <four>JumpSMS4</four>
            <five>JumpSMS5</five>
            <six>JumpSMS6</six>
            <seven>JumpSMS7</seven>
            <eight>JumpSMS8</eight>
            <nine>JumpSMS9</nine>
        </keyboard>
    </musiclibrary>
</keymap>

It works perfectly as designed, but seems a little difficult to implement in the design described below, since it skips unfound letters. (details below)

Replacing "Jump" with "Filter" it does not work at all, the results seem completely random.

-----------------
This is the design I was thinking of for Jump. (The design for filtering (which I mistakenly called search) is in the OP, so I won't repeat it.)

-A keymap would launch a Jump To dialog
-This dialog would have no GUI, it's only purpose is to trap keystrokes.
When the user press a letter key it jumps to the first item in the list starting with that letter and closes. Actually pressing any key closes the dialog

I realize this post is diverting from the OP, I can repost in a new "Jump" thread if that is better.
Reply
#9
SHIFT-A jumps to A. JumpSMS2 jumps to A, then B, then C, then 2 etc.

FilterSMS2 filters out anything that doesn't match "ABC2" somewhere, possibly word-based, I can't recall offhand. Press FilterSMS3 then and that adds on DEF3 - i.e. you'll match things such as "adlib" and "because", but won't be matching "anton" any longer. FilterClear to clear the filter.

The filter button works exactly the same way - if you enter numbers it assumes an SMS-style matching, else it'll be done with letters.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#10
SHIFT+ is perfect for jump (I should have figured that out myself with testing)

As far as the filtering, this going to take some time to figure out, your tidbits paint a general sketch, is there a dev reference doc that explains it?

Thanks again
Reply

Logout Mark Read Team Forum Stats Members Help
MyMusic search0