New search capabilities; autorating, bitrate, track number, playtime, samplerate
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6588 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
4dd5134a1f
commit
261bb920c2
5 changed files with 38 additions and 0 deletions
|
@ -159,6 +159,11 @@ void buildchoices(int mask) {
|
|||
editing.selection_candidates[i++]=TOKEN_YEAR;
|
||||
editing.selection_candidates[i++]=TOKEN_RATING;
|
||||
editing.selection_candidates[i++]=TOKEN_PLAYCOUNT;
|
||||
editing.selection_candidates[i++]=TOKEN_AUTORATING;
|
||||
editing.selection_candidates[i++]=TOKEN_TRACKNUM;
|
||||
editing.selection_candidates[i++]=TOKEN_PLAYTIME;
|
||||
editing.selection_candidates[i++]=TOKEN_SAMPLERATE;
|
||||
editing.selection_candidates[i++]=TOKEN_BITRATE;
|
||||
}
|
||||
if(mask&ACCEPT_STRARG) {
|
||||
editing.selection_candidates[i++]=TOKEN_STRING;
|
||||
|
|
|
@ -46,11 +46,16 @@ char *tokentypetostring(int tokentype) {
|
|||
case TOKEN_YEAR: return "year";
|
||||
case TOKEN_RATING: return "rating";
|
||||
case TOKEN_PLAYCOUNT: return "playcount";
|
||||
case TOKEN_AUTORATING: return "autorating";
|
||||
case TOKEN_TITLE: return "title";
|
||||
case TOKEN_ARTIST: return "artist";
|
||||
case TOKEN_ALBUM: return "album";
|
||||
case TOKEN_GENRE: return "genre";
|
||||
case TOKEN_FILENAME: return "filename";
|
||||
case TOKEN_PLAYTIME: return "playtime";
|
||||
case TOKEN_TRACKNUM: return "track number";
|
||||
case TOKEN_SAMPLERATE: return "sample rate";
|
||||
case TOKEN_BITRATE: return "bitrate";
|
||||
}
|
||||
return "tokentypeerror";
|
||||
}
|
||||
|
@ -61,6 +66,10 @@ char *numidtostring(int numid) {
|
|||
case INTVALUE_RATING: return "<rating>";
|
||||
case INTVALUE_PLAYCOUNT: return "<playcount>";
|
||||
case INTVALUE_AUTORATING: return "<autorating>";
|
||||
case INTVALUE_PLAYTIME: return "<playtime>";
|
||||
case INTVALUE_TRACKNUM: return "<track number>";
|
||||
case INTVALUE_SAMPLERATE: return "<sample rate>";
|
||||
case INTVALUE_BITRATE: return "<bitrate>";
|
||||
}
|
||||
return "numiderror";
|
||||
}
|
||||
|
|
|
@ -54,6 +54,10 @@
|
|||
#define TOKEN_FILENAME 125
|
||||
#define TOKEN_EDIT 126
|
||||
#define TOKEN_AUTORATING 127
|
||||
#define TOKEN_PLAYTIME 128
|
||||
#define TOKEN_TRACKNUM 129
|
||||
#define TOKEN_SAMPLERATE 130
|
||||
#define TOKEN_BITRATE 131
|
||||
|
||||
#define ACCEPT_EOF 0x1
|
||||
#define ACCEPT_BOOLOP 0x2
|
||||
|
@ -70,6 +74,10 @@
|
|||
#define INTVALUE_RATING 2
|
||||
#define INTVALUE_PLAYCOUNT 3
|
||||
#define INTVALUE_AUTORATING 4
|
||||
#define INTVALUE_PLAYTIME 5
|
||||
#define INTVALUE_TRACKNUM 6
|
||||
#define INTVALUE_SAMPLERATE 7
|
||||
#define INTVALUE_BITRATE 8
|
||||
#define INTVALUE_TITLE 14
|
||||
#define INTVALUE_ARTIST 15
|
||||
#define INTVALUE_ALBUM 16
|
||||
|
|
|
@ -72,6 +72,18 @@ int getvalue(struct token *token) {
|
|||
case INTVALUE_PLAYCOUNT:
|
||||
loadrundbdata();
|
||||
return currententry->playcount;
|
||||
case INTVALUE_PLAYTIME:
|
||||
loadsongdata();
|
||||
return currententry->playtime;
|
||||
case INTVALUE_TRACKNUM:
|
||||
loadsongdata();
|
||||
return currententry->track;
|
||||
case INTVALUE_BITRATE:
|
||||
loadsongdata();
|
||||
return currententry->bitrate;
|
||||
case INTVALUE_SAMPLERATE:
|
||||
loadsongdata();
|
||||
return currententry->samplerate;
|
||||
case INTVALUE_AUTORATING:
|
||||
if(!dbglobal.gotplaycountlimits) {
|
||||
index=dbglobal.currententryindex;
|
||||
|
|
|
@ -44,6 +44,10 @@
|
|||
#define INTVALUE_RATING 2
|
||||
#define INTVALUE_PLAYCOUNT 3
|
||||
#define INTVALUE_AUTORATING 4
|
||||
#define INTVALUE_PLAYTIME 5
|
||||
#define INTVALUE_TRACKNUM 6
|
||||
#define INTVALUE_SAMPLERATE 7
|
||||
#define INTVALUE_BITRATE 8
|
||||
#define INTVALUE_TITLE 14
|
||||
#define INTVALUE_ARTIST 15
|
||||
#define INTVALUE_ALBUM 16
|
||||
|
|
Loading…
Reference in a new issue