1
0
Fork 0
forked from len0rd/rockbox

Added autoscore tag (%ra) to wps.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13169 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Miika Pekkarinen 2007-04-15 15:46:46 +00:00
parent 1c0f41447a
commit f53a8f8cd4
3 changed files with 9 additions and 0 deletions

View file

@ -1175,6 +1175,13 @@ static char *get_token_value(struct gui_wps *gwps,
snprintf(buf, buf_size, "%d", id3->rating);
return buf;
case WPS_TOKEN_DATABASE_AUTOSCORE:
if (intval)
*intval = id3->score + 1;
snprintf(buf, buf_size, "%d", id3->score);
return buf;
#if (CONFIG_CODEC == SWCODEC)
case WPS_TOKEN_CROSSFADE:
if (intval)

View file

@ -166,6 +166,7 @@ enum wps_token_type {
/* Database */
WPS_TOKEN_DATABASE_PLAYCOUNT,
WPS_TOKEN_DATABASE_RATING,
WPS_TOKEN_DATABASE_AUTOSCORE,
/* File */
WPS_TOKEN_FILE_BITRATE,

View file

@ -232,6 +232,7 @@ static const struct wps_tag all_tags[] = {
{ WPS_TOKEN_DATABASE_PLAYCOUNT, "rp", WPS_REFRESH_DYNAMIC, NULL },
{ WPS_TOKEN_DATABASE_RATING, "rr", WPS_REFRESH_DYNAMIC, NULL },
{ WPS_TOKEN_DATABASE_AUTOSCORE, "ra", WPS_REFRESH_DYNAMIC, NULL },
#if CONFIG_CODEC == SWCODEC
{ WPS_TOKEN_REPLAYGAIN, "rg", WPS_REFRESH_STATIC, NULL },
{ WPS_TOKEN_CROSSFADE, "xf", WPS_REFRESH_DYNAMIC, NULL },