summaryrefslogtreecommitdiff
path: root/apps/plugins/databox
diff options
context:
space:
mode:
authorMichiel Van Der Kolk <not.valid@email.address>2005-06-06 19:34:35 +0000
committerMichiel Van Der Kolk <not.valid@email.address>2005-06-06 19:34:35 +0000
commit261bb920c2719a472be388d320cdfadfa3732ad6 (patch)
tree9e52be510e20142534ccf0303769256353c595e3 /apps/plugins/databox
parent4dd5134a1fef577721cf5b6dfd9f0c529803d2ec (diff)
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/plugins/databox')
-rw-r--r--apps/plugins/databox/databox.c5
-rw-r--r--apps/plugins/databox/edittoken.c9
-rw-r--r--apps/plugins/databox/edittoken.h8
3 files changed, 22 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) {
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;
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) {
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";
}
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 @@
#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