diff options
-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) { 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 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) { 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; 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 @@ #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 |