[HOW-TO] Add a search button on XBMC home. - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: Skins Support (https://forum.kodi.tv/forumdisplay.php?fid=67) +--- Thread: [HOW-TO] Add a search button on XBMC home. (/showthread.php?tid=97601) |
[HOW-TO] Add a search button on XBMC home. - Smb3M - 2011-03-24 What I need A custom button on my XBMC home that made a search through my video library. I wanna block the visual of library, so the search dialog will noy can be opened in the usual way and I need a simple button on my home that do it. Do it works? Yes. Here a video. Don't focus on the empty button, or the low res of my icons: I'm tryng to develop a custom skin, based on original alaska, for my parents low-res tv. It search for a string anywhere in the XBMC video database; I didn't (yet) find a way to implement a global search, but can be add another button for music search. How it works It's a custom button with 2 onclick tags that open the video library and then the search dialog box. Using SendClick(windowid,id) fuction http://wiki.xbmc.org/?title=List_of_Built_In_Functions that sends a click to a control in a given window (or active window if omitted), I add a second onclick tag on my button so it immediately open the search dialog box after videolibrary. The search action ID in MyVideoNav.xml is 8 so I add SendClick(8). This is my code: Code: <item id="7"> Replacing the first onclick tag with ActivateWindow(musiclibrary) it will search through music library. SendClick function permits to call action for specific windows, pointing a windws ID before the action ID; I tried with all the ID of VideoLibrary but it didn't work. The only way I found is open the VideoLibrary before. - ronie - 2011-03-24 Smb3M Wrote:SendClick function permits to call action for specific windows, pointing a windws ID before the action ID; I tried with all the ID of VideoLibrary but it didn't work. The only way I found is open the VideoLibrary before. i suppose specifying the window id is only usefull in dialogs, to send a click to the window below. nice howto btw. :-) - igotdvds - 2011-03-24 Nice touch. Adding this to Simplicity. Its a workaround...but it works. - butchabay - 2011-04-04 Thanx for the idea and the HOW TO ... I've modified it to have a search button on each submenu, example: Music: --> Search (Musiclibrary) Video: --> Search (Videolibrary) Movies: --> Search (VideoLibrary,MovieTitles) TVShows: --> Search (VideoLibrary,TVShowTitles) - castortray - 2011-04-10 gr8, thx for that !!! addedd to [MOD] Customizable Confluence more details: http://forum.xbmc.org/showpost.php?p=771610&postcount=8 |