diff options
author | Michiel Van Der Kolk <not.valid@email.address> | 2005-06-06 19:34:35 +0000 |
---|---|---|
committer | Michiel Van Der Kolk <not.valid@email.address> | 2005-06-06 19:34:35 +0000 |
commit | 261bb920c2719a472be388d320cdfadfa3732ad6 (patch) | |
tree | 9e52be510e20142534ccf0303769256353c595e3 /apps | |
parent | 4dd5134a1fef577721cf5b6dfd9f0c529803d2ec (diff) | |
download | rockbox-261bb920c2719a472be388d320cdfadfa3732ad6.tar.gz rockbox-261bb920c2719a472be388d320cdfadfa3732ad6.zip |
New search capabilities; autorating, bitrate, track number, playtime, samplerate
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6588 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/plugins/databox/databox.c | 5 | ||||
-rw-r--r-- | apps/plugins/databox/edittoken.c | 9 | ||||
-rw-r--r-- | apps/plugins/databox/edittoken.h | 8 | ||||
-rw-r--r-- | apps/plugins/searchengine/token.c | 12 | ||||
-rw-r--r-- | apps/plugins/searchengine/token.h | 4 |
5 files changed, 38 insertions, 0 deletions
diff --git a/apps/plugins/databox/databox.c b/apps/plugins/databox/databox.c index 58f949ee19..8fc8c0b499 100644 --- a/apps/plugins/databox/databox.c +++ b/apps/plugins/databox/databox.c | |||
@@ -159,6 +159,11 @@ void buildchoices(int mask) { | |||
159 | editing.selection_candidates[i++]=TOKEN_YEAR; | 159 | editing.selection_candidates[i++]=TOKEN_YEAR; |
160 | editing.selection_candidates[i++]=TOKEN_RATING; | 160 | editing.selection_candidates[i++]=TOKEN_RATING; |
161 | editing.selection_candidates[i++]=TOKEN_PLAYCOUNT; | 161 | editing.selection_candidates[i++]=TOKEN_PLAYCOUNT; |
162 | editing.selection_candidates[i++]=TOKEN_AUTORATING; | ||
163 | editing.selection_candidates[i++]=TOKEN_TRACKNUM; | ||
164 | editing.selection_candidates[i++]=TOKEN_PLAYTIME; | ||
165 | editing.selection_candidates[i++]=TOKEN_SAMPLERATE; | ||
166 | editing.selection_candidates[i++]=TOKEN_BITRATE; | ||
162 | } | 167 | } |
163 | if(mask&ACCEPT_STRARG) { | 168 | if(mask&ACCEPT_STRARG) { |
164 | editing.selection_candidates[i++]=TOKEN_STRING; | 169 | editing.selection_candidates[i++]=TOKEN_STRING; |
diff --git a/apps/plugins/databox/edittoken.c b/apps/plugins/databox/edittoken.c index 71548d6ce1..d3145b7e09 100644 --- a/apps/plugins/databox/edittoken.c +++ b/apps/plugins/databox/edittoken.c | |||
@@ -46,11 +46,16 @@ char *tokentypetostring(int tokentype) { | |||
46 | case TOKEN_YEAR: return "year"; | 46 | case TOKEN_YEAR: return "year"; |
47 | case TOKEN_RATING: return "rating"; | 47 | case TOKEN_RATING: return "rating"; |
48 | case TOKEN_PLAYCOUNT: return "playcount"; | 48 | case TOKEN_PLAYCOUNT: return "playcount"; |
49 | case TOKEN_AUTORATING: return "autorating"; | ||
49 | case TOKEN_TITLE: return "title"; | 50 | case TOKEN_TITLE: return "title"; |
50 | case TOKEN_ARTIST: return "artist"; | 51 | case TOKEN_ARTIST: return "artist"; |
51 | case TOKEN_ALBUM: return "album"; | 52 | case TOKEN_ALBUM: return "album"; |
52 | case TOKEN_GENRE: return "genre"; | 53 | case TOKEN_GENRE: return "genre"; |
53 | case TOKEN_FILENAME: return "filename"; | 54 | case TOKEN_FILENAME: return "filename"; |
55 | case TOKEN_PLAYTIME: return "playtime"; | ||
56 | case TOKEN_TRACKNUM: return "track number"; | ||
57 | case TOKEN_SAMPLERATE: return "sample rate"; | ||
58 | case TOKEN_BITRATE: return "bitrate"; | ||
54 | } | 59 | } |
55 | return "tokentypeerror"; | 60 | return "tokentypeerror"; |
56 | } | 61 | } |
@@ -61,6 +66,10 @@ char *numidtostring(int numid) { | |||
61 | case INTVALUE_RATING: return "<rating>"; | 66 | case INTVALUE_RATING: return "<rating>"; |
62 | case INTVALUE_PLAYCOUNT: return "<playcount>"; | 67 | case INTVALUE_PLAYCOUNT: return "<playcount>"; |
63 | case INTVALUE_AUTORATING: return "<autorating>"; | 68 | case INTVALUE_AUTORATING: return "<autorating>"; |
69 | case INTVALUE_PLAYTIME: return "<playtime>"; | ||
70 | case INTVALUE_TRACKNUM: return "<track number>"; | ||
71 | case INTVALUE_SAMPLERATE: return "<sample rate>"; | ||
72 | case INTVALUE_BITRATE: return "<bitrate>"; | ||
64 | } | 73 | } |
65 | return "numiderror"; | 74 | return "numiderror"; |
66 | } | 75 | } |
diff --git a/apps/plugins/databox/edittoken.h b/apps/plugins/databox/edittoken.h index 4c9f535448..6f176e72b5 100644 --- a/apps/plugins/databox/edittoken.h +++ b/apps/plugins/databox/edittoken.h | |||
@@ -54,6 +54,10 @@ | |||
54 | #define TOKEN_FILENAME 125 | 54 | #define TOKEN_FILENAME 125 |
55 | #define TOKEN_EDIT 126 | 55 | #define TOKEN_EDIT 126 |
56 | #define TOKEN_AUTORATING 127 | 56 | #define TOKEN_AUTORATING 127 |
57 | #define TOKEN_PLAYTIME 128 | ||
58 | #define TOKEN_TRACKNUM 129 | ||
59 | #define TOKEN_SAMPLERATE 130 | ||
60 | #define TOKEN_BITRATE 131 | ||
57 | 61 | ||
58 | #define ACCEPT_EOF 0x1 | 62 | #define ACCEPT_EOF 0x1 |
59 | #define ACCEPT_BOOLOP 0x2 | 63 | #define ACCEPT_BOOLOP 0x2 |
@@ -70,6 +74,10 @@ | |||
70 | #define INTVALUE_RATING 2 | 74 | #define INTVALUE_RATING 2 |
71 | #define INTVALUE_PLAYCOUNT 3 | 75 | #define INTVALUE_PLAYCOUNT 3 |
72 | #define INTVALUE_AUTORATING 4 | 76 | #define INTVALUE_AUTORATING 4 |
77 | #define INTVALUE_PLAYTIME 5 | ||
78 | #define INTVALUE_TRACKNUM 6 | ||
79 | #define INTVALUE_SAMPLERATE 7 | ||
80 | #define INTVALUE_BITRATE 8 | ||
73 | #define INTVALUE_TITLE 14 | 81 | #define INTVALUE_TITLE 14 |
74 | #define INTVALUE_ARTIST 15 | 82 | #define INTVALUE_ARTIST 15 |
75 | #define INTVALUE_ALBUM 16 | 83 | #define INTVALUE_ALBUM 16 |
diff --git a/apps/plugins/searchengine/token.c b/apps/plugins/searchengine/token.c index 5950605ade..d51d92a712 100644 --- a/apps/plugins/searchengine/token.c +++ b/apps/plugins/searchengine/token.c | |||
@@ -72,6 +72,18 @@ int getvalue(struct token *token) { | |||
72 | case INTVALUE_PLAYCOUNT: | 72 | case INTVALUE_PLAYCOUNT: |
73 | loadrundbdata(); | 73 | loadrundbdata(); |
74 | return currententry->playcount; | 74 | return currententry->playcount; |
75 | case INTVALUE_PLAYTIME: | ||
76 | loadsongdata(); | ||
77 | return currententry->playtime; | ||
78 | case INTVALUE_TRACKNUM: | ||
79 | loadsongdata(); | ||
80 | return currententry->track; | ||
81 | case INTVALUE_BITRATE: | ||
82 | loadsongdata(); | ||
83 | return currententry->bitrate; | ||
84 | case INTVALUE_SAMPLERATE: | ||
85 | loadsongdata(); | ||
86 | return currententry->samplerate; | ||
75 | case INTVALUE_AUTORATING: | 87 | case INTVALUE_AUTORATING: |
76 | if(!dbglobal.gotplaycountlimits) { | 88 | if(!dbglobal.gotplaycountlimits) { |
77 | index=dbglobal.currententryindex; | 89 | index=dbglobal.currententryindex; |
diff --git a/apps/plugins/searchengine/token.h b/apps/plugins/searchengine/token.h index 12065511ac..cd337690bb 100644 --- a/apps/plugins/searchengine/token.h +++ b/apps/plugins/searchengine/token.h | |||
@@ -44,6 +44,10 @@ | |||
44 | #define INTVALUE_RATING 2 | 44 | #define INTVALUE_RATING 2 |
45 | #define INTVALUE_PLAYCOUNT 3 | 45 | #define INTVALUE_PLAYCOUNT 3 |
46 | #define INTVALUE_AUTORATING 4 | 46 | #define INTVALUE_AUTORATING 4 |
47 | #define INTVALUE_PLAYTIME 5 | ||
48 | #define INTVALUE_TRACKNUM 6 | ||
49 | #define INTVALUE_SAMPLERATE 7 | ||
50 | #define INTVALUE_BITRATE 8 | ||
47 | #define INTVALUE_TITLE 14 | 51 | #define INTVALUE_TITLE 14 |
48 | #define INTVALUE_ARTIST 15 | 52 | #define INTVALUE_ARTIST 15 |
49 | #define INTVALUE_ALBUM 16 | 53 | #define INTVALUE_ALBUM 16 |