summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiika Pekkarinen <miipekk@ihme.org>2007-04-15 15:46:46 +0000
committerMiika Pekkarinen <miipekk@ihme.org>2007-04-15 15:46:46 +0000
commitf53a8f8cd48b0c679b4bb7da2947e39ff2f7e223 (patch)
treee5789febd835ffef109fbe95e5259c501dadec19
parent1c0f41447ade94e89fa0d773792205ab99a73538 (diff)
downloadrockbox-f53a8f8cd48b0c679b4bb7da2947e39ff2f7e223.zip
rockbox-f53a8f8cd48b0c679b4bb7da2947e39ff2f7e223.tar.gz
rockbox-f53a8f8cd48b0c679b4bb7da2947e39ff2f7e223.tar.bz2
rockbox-f53a8f8cd48b0c679b4bb7da2947e39ff2f7e223.tar.xz
Added autoscore tag (%ra) to wps.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13169 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/gui/gwps-common.c7
-rw-r--r--apps/gui/gwps.h1
-rw-r--r--apps/gui/wps_parser.c1
3 files changed, 9 insertions, 0 deletions
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c
index 5b06dd4..d6576a2 100644
--- a/apps/gui/gwps-common.c
+++ b/apps/gui/gwps-common.c
@@ -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)
diff --git a/apps/gui/gwps.h b/apps/gui/gwps.h
index 801a379..7d82179 100644
--- a/apps/gui/gwps.h
+++ b/apps/gui/gwps.h
@@ -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,
diff --git a/apps/gui/wps_parser.c b/apps/gui/wps_parser.c
index 2c7a000..0617ed2 100644
--- a/apps/gui/wps_parser.c
+++ b/apps/gui/wps_parser.c
@@ -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 },