diff options
| author | Miika Pekkarinen <miipekk@ihme.org> | 2007-04-15 13:50:07 +0000 |
|---|---|---|
| committer | Miika Pekkarinen <miipekk@ihme.org> | 2007-04-15 13:50:07 +0000 |
| commit | 3c6e46ce64297697bbd6c713da3d0ba7856d6ea9 (patch) | |
| tree | 70d06d90747ff4d93f687db7cbaf95bbdeae1d72 | |
| parent | 483c87a04d3be8be31034a508676e51a423402c4 (diff) | |
| download | rockbox-3c6e46ce64297697bbd6c713da3d0ba7856d6ea9.zip rockbox-3c6e46ce64297697bbd6c713da3d0ba7856d6ea9.tar.gz rockbox-3c6e46ce64297697bbd6c713da3d0ba7856d6ea9.tar.bz2 rockbox-3c6e46ce64297697bbd6c713da3d0ba7856d6ea9.tar.xz | |
FS#6949 - WPS tag for database autoscore. Author wanted to remain anonymous.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13164 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | apps/gui/gwps-common.c | 7 | ||||
| -rw-r--r-- | apps/gui/gwps.h | 1 | ||||
| -rw-r--r-- | apps/gui/wps_parser.c | 1 |
3 files changed, 9 insertions, 0 deletions
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c index 5b06dd4..778c0b0 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_SCORE: + 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..4f7e9b4 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_SCORE, /* File */ WPS_TOKEN_FILE_BITRATE, diff --git a/apps/gui/wps_parser.c b/apps/gui/wps_parser.c index 2c7a000..588b0d6 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_SCORE, "rs", WPS_REFRESH_DYNAMIC, NULL }, #if CONFIG_CODEC == SWCODEC { WPS_TOKEN_REPLAYGAIN, "rg", WPS_REFRESH_STATIC, NULL }, { WPS_TOKEN_CROSSFADE, "xf", WPS_REFRESH_DYNAMIC, NULL }, |