---+!! Searchengine %RED%This plugin is outdated and not included in current builds. It worked with the old externally generated database which is now replaced by a new one (with an own search feature too),.%ENDCOLOR% %TOC% ---++ General You are supposed to use the PluginDatabox to create search queries and you use this plugin to actually run those searches. Items in %BLUE%blue%ENDCOLOR% are planned but not implemented yet. ---++ Search Expression Language Autorating is (playcount-playcountmin)*10/(playcountmax-playcountmin) In EBNF: NUMARG := number | numberid%BR% STRARG := string | stringid NUMOP : = '>' | '>=' | '<' | '<=' | '!=' | '=='%BR% STROP : = CONTAINS | EQUALS | STARTSWITH | ENDSWITH COMPARE : = NUMARG NUMOP NUMARG | STRARG STROP STRARG EXPR := COMPARE | NOT EXPR | LPAREN MEXPR RPAREN LEXPR := EXPR (AND EXPR)* MEXPR := LEXPR (OR LEXPR)* %BLUE%CLIPPING := PLAYTIME number | COUNT number SORTTYPE := (LOWEST|HIGHEST) (rating | playcount | year | tracknumber)%ENDCOLOR% QUERY := MEXPR %BLUE%(SORTBY SORTTYPE (AND SORTTYPE)*)? (CLIPBY CLIPPING)? (SHUFFLE)?%ENDCOLOR% EOF numberid := year | rating | playcount | autorating | tracknumber%BR% stringid := title | genre | artist | album | filename ---++ Tokenfile description ---+++Token Types |*Token type*|*ID*|*Description*| |EOF|0|End of file / search| |NOT|1| invert expression operator| |AND|2| and expression operator| |OR|3| or expression operator| |GT|4| <nop>GreaterThan ( > ) number operator| |GTE|5| <nop>GreaterThanorEqual ( >= ) number operator| |LT|6| <nop>LessThan ( < ) number operator| |LTE|7| <nop>LessThanorEqual ( <= ) number operator| |EQ|8| Equal ( == ) number operator| |NE|9| <nop>NotEqual ( != ) number operator| |CONTAINS|10| contains string operator| |EQUALS|11| equals string operator| |STARTSWITH|12| startswith string operator| |ENDSWITH|13| startswith string operator| |LPAREN|14| '(' open new multiple-expression| |RPAREN|15| ')' close previously opened multiple-expression| |NUM|16| Number, value stored in intvalue| |NUMID|17| Number property of a song, intvalue holds numberid (see <nop>NumberID intvalues)| |STRING|18| String, stored in spelling| |STRINGID|19| String property of a song, intvalue holds stringid (see <nop>StringID intvalues)| |SHUFFLE|20|Shuffle results| |PLAYTIMELIMIT|21|Limit playtime to # minutes (in intvalue)| ---+++ Token Entry |*Field*|*Size*|*Description*| |kind|1| Token type (see Token Types)| |spelling|255| Text of a TOKEN_STRING| |intvalue|4| Intvalue of this token| ---+++ Token file <verbatim> # Token Entries 1 EOF Token entry. EOF </verbatim> ---++ Todo 1) optimize album / artist names.<br> 2) dynamic caching for targets with less ram (i have no idea how to do this (HCl))<br> ---+++ Suggestion to change interface of searchengine and databox _(This is probably not really the right place to put this, maybe I should move it into an RFE? Sourceforge is acting up though...)_ I propose that the code of the current two rocks are merged into one, in the following way: The new plugin should be available both through the "View Plugins" menu, and the "Open with" menu. This is not possible right now, but probably shouldn't be too hard. When running the plugin from the pluginlist, show a menu: * Create new search - opens edit mode * Saved searches - shows a list of searches in .rockbox/searches/ where "entering" each would work as if it was run in the filebrowser. When running an .rsp file, show the menu (with the filename at the top, I guess): * Run and play - executes the query, add results to playlist * Run and save playlist - executes the query, asks for a filename and saves the .m3u * Edit - opens editmode When the user has finished editing a search, show the following menu: * Run and play - executes the query, add results to playlist * Run and save playlist - executes the query, asks for a filename and saves the .m3u * Save searchfile - ask for filename (make the default .rockbox/searches/search.rsp), save an .rsp and quit ---++++!! Results The original use scenarios are still available * Creating an .rsp file by going into "View plugins". * Opening an .rsp file and saving a playlist (though with a single extra step). Additionally, the following things become possible: * Creating running and playing a search in one go, without creating any files. * Creating a playlist of a search without having to first save the .rsp. * Editing, then saving a search without having to go into the menu. I really think this would boost useability of the search --- CategoryOldPlugin: Database Searchengine [Player%Y%, Recorder%Y%, Ondio%Y%, H100%Y%, H300%Y%, iPod 4G%Y%, iPod Color%Y%, iPod Nano%Y%, iPod Video%Y%]
r14 - 13 Apr 2007 - 09:45:37 -
Copyright © by the contributing authors.