summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2024-12-03 11:42:46 -0500
committerSolomon Peachy <pizza@shaftnet.org>2024-12-07 13:21:21 -0500
commit62b5dfd81ddfa3ff1a7a30d8065b7bdcfcf978bd (patch)
tree8f38592b318c77d0dab5701b760d1749b7001fa0
parentc754bc5870dee90058ea431ce88360ddc4815120 (diff)
downloadrockbox-62b5dfd81d.tar.gz
rockbox-62b5dfd81d.zip
[Feature] Skin engine Themes grab text from a file %ft(file, line) WIP
allow the skin engine to read text files and return a particular line you then can use ss on that string to allow display of strings from the file (Playername comes to mind) able to be used as conditional %?ft(filename)<Found|Not Found> if (selected) line of file is empty the tag is treated as #COMMENT scroll timeouts now persist thru trackchange bugfix: %t(n)%?x<text|text> would ignore the specified timeout defaulting to 2 seconds playername.txt generated at boot if it doesn't exist contents: 'RockBox!' Change-Id: I961910e01be052ef902f77e6d92fc3e367ffe9d0
-rw-r--r--apps/gui/skin_engine/skin_parser.c70
-rw-r--r--apps/gui/skin_engine/skin_render.c23
-rw-r--r--apps/main.c14
-rw-r--r--lib/skin_parser/tag_table.c1
-rw-r--r--lib/skin_parser/tag_table.h1
-rw-r--r--utils/skinupdater/tag_table.c1
-rw-r--r--wps/cabbiev2.112x64x1.wps2
-rw-r--r--wps/cabbiev2.128x128x16.wps2
-rw-r--r--wps/cabbiev2.128x128x2.wps2
-rw-r--r--wps/cabbiev2.128x160x16.wps2
-rw-r--r--wps/cabbiev2.128x64x1.wps2
-rw-r--r--wps/cabbiev2.128x96x16.wps2
-rw-r--r--wps/cabbiev2.128x96x2.wps2
-rw-r--r--wps/cabbiev2.132x80x16.wps4
-rw-r--r--wps/cabbiev2.138x110x2.wps4
-rw-r--r--wps/cabbiev2.160x128x1.wps2
-rw-r--r--wps/cabbiev2.160x128x16.wps4
-rw-r--r--wps/cabbiev2.160x128x2.wps4
-rw-r--r--wps/cabbiev2.176x132x16.wps4
-rw-r--r--wps/cabbiev2.176x220x16.wps2
-rw-r--r--wps/cabbiev2.220x176x16.wps4
-rw-r--r--wps/cabbiev2.240x320x16.mini2440.wps4
-rw-r--r--wps/cabbiev2.240x320x16.wps4
-rw-r--r--wps/cabbiev2.240x400x16.wps4
-rw-r--r--wps/cabbiev2.320x240x16.mrobe500.wps4
-rw-r--r--wps/cabbiev2.320x240x16.wps4
-rw-r--r--wps/cabbiev2.320x480x16.wps4
-rw-r--r--wps/cabbiev2.360x400x16.wps4
-rw-r--r--wps/cabbiev2.400x240x16.wps4
-rw-r--r--wps/cabbiev2.480x800x16.wps4
-rw-r--r--wps/cabbiev2.800x480x16.wps4
-rw-r--r--wps/cabbiev2.96x96x16.wps2
32 files changed, 144 insertions, 50 deletions
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c
index 33f82ef9e1..929e4a2af2 100644
--- a/apps/gui/skin_engine/skin_parser.c
+++ b/apps/gui/skin_engine/skin_parser.c
@@ -1316,6 +1316,73 @@ static int parse_progressbar_tag(struct skin_element* element,
return 0;
}
+static int parse_filetext(struct skin_element *element,
+ struct wps_token *token,
+ struct wps_data *wps_data)
+{
+ (void)wps_data;
+ const char* filename;
+ char buf[MAX_PATH];
+ int line = 0;
+ int fd;
+
+ /* format: %ft(filename[,line]) */
+ filename = get_param_text(element, 0);
+
+ if (element->params_count == 2)
+ line = get_param(element, 1)->data.number;
+ else if (element->params_count != 1)
+ {
+ DEBUGF("%s(file, line): %s Error: param count %d\n",
+ __func__, filename, element->params_count);
+ return WPS_ERROR_INVALID_PARAM;
+ }
+ path_append(buf, root_realpath(), filename, sizeof(buf));
+ DEBUGF("%s %s[%d]\n", __func__, buf, line);
+
+ if ((fd = open_utf8(buf, O_RDONLY)) < 0)
+ {
+ DEBUGF("%s: Error Opening %s\n", __func__, buf);
+ goto failure;
+ }
+
+ int rd = 0;
+ while (line >= 0)
+ {
+ if ((rd = read_line(fd, buf, sizeof(buf))) < 0)
+ {
+ buf[0] = '\0';
+ break;
+ }
+ line--;
+ }
+
+ if (rd <= 0) /* empty line? */
+ {
+ DEBUGF("%s: Error(%d) Reading %s\n", __func__, rd, filename);
+ goto failure;
+ }
+
+ buf[rd] = '\0';
+ char * skinbuf = skin_buffer_alloc(rd+1);
+
+ if (!skinbuf)
+ {
+ DEBUGF("%s: Error No Buffer %s\n", __func__, filename);
+ close(fd);
+ return WPS_ERROR_INVALID_PARAM;
+ }
+ strcpy(skinbuf, buf);
+ close(fd);
+ token->value.data = PTRTOSKINOFFSET(skin_buffer, skinbuf);
+ token->type = SKIN_TOKEN_STRING;
+ return 0;
+failure:
+ element->type = COMMENT;
+ token->type = SKIN_TOKEN_NO_TOKEN;
+ return 0;
+}
+
#ifdef HAVE_ALBUMART
static int parse_albumart_load(struct skin_element* element,
struct wps_token *token,
@@ -2378,6 +2445,9 @@ static int skin_element_callback(struct skin_element* element, void* data)
case SKIN_TOKEN_FILE_DIRECTORY:
token->value.i = get_param(element, 0)->data.number;
break;
+ case SKIN_TOKEN_FILE_TEXT:
+ function = parse_filetext;
+ break;
#ifdef HAVE_BACKDROP_IMAGE
case SKIN_TOKEN_VIEWPORT_FGCOLOUR:
case SKIN_TOKEN_VIEWPORT_BGCOLOUR:
diff --git a/apps/gui/skin_engine/skin_render.c b/apps/gui/skin_engine/skin_render.c
index 06f7d9798d..953b75044f 100644
--- a/apps/gui/skin_engine/skin_render.c
+++ b/apps/gui/skin_engine/skin_render.c
@@ -633,20 +633,23 @@ static int get_subline_timeout(struct gui_wps *gwps, struct skin_element* line)
{
token = SKINOFFSETTOPTR(skin_buffer, element->data);
if (token)
- return token->value.i;
+ retval = token->value.i;
}
else if (element->type == CONDITIONAL)
{
struct conditional *conditional = SKINOFFSETTOPTR(skin_buffer, element->data);
- int val = evaluate_conditional(gwps, 0, conditional,
- element->children_count);
- if (val >= 0)
+ int val = evaluate_conditional(gwps, 0, conditional, element->children_count);
+
+ int tmoval = get_subline_timeout(gwps, get_child(element->children, val));
+ if (tmoval >= 0)
{
- retval = get_subline_timeout(gwps, get_child(element->children, val));
- if (retval >= 0)
- return retval;
+ return MAX(retval, tmoval); /* Bugfix %t()%?CONDITIONAL tmo ignored */
}
}
+ else if (element->type == COMMENT)
+ {
+ retval = 0; /* don't display this item */
+ }
element = SKINOFFSETTOPTR(skin_buffer, element->next);
}
return retval;
@@ -657,6 +660,7 @@ bool skin_render_alternator(struct skin_element* element, struct skin_draw_info
bool changed_lines = false;
struct line_alternator *alternator = SKINOFFSETTOPTR(skin_buffer, element->data);
unsigned old_refresh = info->refresh_type;
+
if (info->refresh_type == SKIN_REFRESH_ALL)
{
alternator->current_line = element->children_count-1;
@@ -697,7 +701,10 @@ bool skin_render_alternator(struct skin_element* element, struct skin_draw_info
if (suitable)
{
alternator->current_line = try_line;
- alternator->next_change_tick = current_tick + rettimeout;
+ if (TIME_AFTER(current_tick, alternator->next_change_tick))
+ {
+ alternator->next_change_tick = current_tick + rettimeout;
+ }
}
info->refresh_type = SKIN_REFRESH_ALL;
diff --git a/apps/main.c b/apps/main.c
index 0241c0e488..93793fff28 100644
--- a/apps/main.c
+++ b/apps/main.c
@@ -199,6 +199,20 @@ int main(void)
}
#endif
+#if !defined(BOOTLOADER)
+ char buf[MAX_PATH / 2];
+ path_append(buf, root_realpath(),ROCKBOX_DIR"/playername.txt", sizeof(buf));
+ if (!file_exists(buf))
+ {
+ int fd = open(buf, O_CREAT|O_WRONLY|O_TRUNC, 0666);
+ if(fd >= 0)
+ {
+ fdprintf(fd, "RockBox!");
+ close(fd);
+ }
+ }
+#endif
+
#ifdef AUTOROCK
{
char filename[MAX_PATH];
diff --git a/lib/skin_parser/tag_table.c b/lib/skin_parser/tag_table.c
index dabd1b5d5f..05f3875a94 100644
--- a/lib/skin_parser/tag_table.c
+++ b/lib/skin_parser/tag_table.c
@@ -50,6 +50,7 @@ static const struct tag_info legal_tags[] =
TAG(SKIN_TOKEN_FILE_SIZE, "fs", "", SKIN_REFRESH_STATIC),
TAG(SKIN_TOKEN_FILE_VBR, "fv", "", SKIN_REFRESH_STATIC),
TAG(SKIN_TOKEN_FILE_DIRECTORY, "d" , "I", SKIN_REFRESH_STATIC),
+ TAG(SKIN_TOKEN_FILE_TEXT, "ft" , "F|i", SKIN_REFRESH_STATIC),
TAG(SKIN_TOKEN_FILE_BITRATE, "Fb", "", SKIN_REFRESH_STATIC),
TAG(SKIN_TOKEN_FILE_CODEC, "Fc", "", SKIN_REFRESH_STATIC),
diff --git a/lib/skin_parser/tag_table.h b/lib/skin_parser/tag_table.h
index 3f01db3f15..4c64fb24aa 100644
--- a/lib/skin_parser/tag_table.h
+++ b/lib/skin_parser/tag_table.h
@@ -155,6 +155,7 @@ enum skin_token_type {
SKIN_TOKEN_FILE_SIZE,
SKIN_TOKEN_FILE_VBR,
SKIN_TOKEN_FILE_DIRECTORY,
+ SKIN_TOKEN_FILE_TEXT,
/* Image */
SKIN_TOKEN_IMAGE_BACKDROP,
diff --git a/utils/skinupdater/tag_table.c b/utils/skinupdater/tag_table.c
index a1a5863de0..041856f3e9 100644
--- a/utils/skinupdater/tag_table.c
+++ b/utils/skinupdater/tag_table.c
@@ -70,6 +70,7 @@ struct tag_info legal_tags[] =
{ "fn", "" },
{ "fp", "" },
{ "fs", "" },
+ { "ft", "" },
{ "fv", "" },
{ "d" , "I" },
diff --git a/wps/cabbiev2.112x64x1.wps b/wps/cabbiev2.112x64x1.wps
index 72a05d27b6..895f79a0e4 100644
--- a/wps/cabbiev2.112x64x1.wps
+++ b/wps/cabbiev2.112x64x1.wps
@@ -50,6 +50,6 @@
%s%ac%?id<%id|%?d(1)<%d(1)|%(root%)>>
%s%ac%?it<%it|%fn>
%s%ac%?ia<%ia|%?iA<%iA|%?d(2)<%d(2)|%(root%)>>>
-%t(5)%ac%s%?Fn<%Sx(Next:) %?It<%It|%Fn>|%ac%?Sr<%pe %Sx(of) %pp|%pp %Sx(of) %pe>>%;%t(5)%ac%s%?Fn<%Sx(Next:) %?Ia<%Ia|%?IA<%IA|%Fn>|%ac%?Sr<%pe %Sx(of) %pp|%pp %Sx(of) %pe>>>
+%t(5)%ac%s%?Fn<%Sx(Next:) %?It<%It|%Fn>|%ac%?Sr<%pe %Sx(of) %pp|%pp %Sx(of) %pe>>%;%t(5)%ac%s%?Fn<%Sx(Next:) %?Ia<%Ia|%?IA<%IA|%Fn>|%ac%?Sr<%pe %Sx(of) %pp|%pp %Sx(of) %pe>>>;%s%ac%t(1)%ft(.rockbox/playername.txt)
%V(0,48,-,8,-)
%pc%ar%pr
diff --git a/wps/cabbiev2.128x128x16.wps b/wps/cabbiev2.128x128x16.wps
index 176b07db58..bf4ee68c48 100644
--- a/wps/cabbiev2.128x128x16.wps
+++ b/wps/cabbiev2.128x128x16.wps
@@ -49,7 +49,7 @@
#
# Next Track Info
%V(3,73,122,12,-)
-%s%ac%Sx(Next:) %?It<%It|%Fn>
+%s%t(300)%ac%Sx(Next:) %?It<%It|%Fn>;%s%ac%t(1)%ft(.rockbox/playername.txt)
#
# Time Elapsed/Remaining
%V(3,95,122,12,1)
diff --git a/wps/cabbiev2.128x128x2.wps b/wps/cabbiev2.128x128x2.wps
index c96844f197..9ff1f7e329 100644
--- a/wps/cabbiev2.128x128x2.wps
+++ b/wps/cabbiev2.128x128x2.wps
@@ -49,7 +49,7 @@
#
# Next Track Info
%V(3,70,122,12,-)
-%s%ac%Sx(Next:) %?It<%It|%Fn>
+%s%t(300)%ac%Sx(Next:) %?It<%It|%Fn>;%s%ac%t(1)%ft(.rockbox/playername.txt)
#
# Time Elapsed/Remaining
%V(3,96,122,12,-)
diff --git a/wps/cabbiev2.128x160x16.wps b/wps/cabbiev2.128x160x16.wps
index d4e221e2db..7468bae9d8 100644
--- a/wps/cabbiev2.128x160x16.wps
+++ b/wps/cabbiev2.128x160x16.wps
@@ -55,7 +55,7 @@
%s%ac%?it<%it|%fn>
%s%ac%?ia<%ia|%?iA<%iA|%?d(2)<%d(2)|%(root%)>>>
-%s%acNext Track:
+%ac%t(300)%Sx(Next Track:);%ac%t(1)%ft(.rockbox/playername.txt)
%s%ac%?It<%It|%Fn>
#Time and Playlist Info
diff --git a/wps/cabbiev2.128x64x1.wps b/wps/cabbiev2.128x64x1.wps
index ddd94eb1fb..63c89213d5 100644
--- a/wps/cabbiev2.128x64x1.wps
+++ b/wps/cabbiev2.128x64x1.wps
@@ -59,4 +59,4 @@
#
# Next Track Info
%V(0,42,128,8,1)
-%ac%s%Sx(Next:) %?It<%It|%Fn>
+%ac%t(300)%s%Sx(Next:) %?It<%It|%Fn>;%s%ac%t(1)%ft(.rockbox/playername.txt)
diff --git a/wps/cabbiev2.128x96x16.wps b/wps/cabbiev2.128x96x16.wps
index 4136fa6d8d..9bf31cd1ef 100644
--- a/wps/cabbiev2.128x96x16.wps
+++ b/wps/cabbiev2.128x96x16.wps
@@ -49,7 +49,7 @@
#
# Next Track Info
%V(3,56,122,12,-)
-%s%ac%Sx(Next:) %?It<%It|%Fn>
+%s%t(300)%ac%Sx(Next:) %?It<%It|%Fn>;%s%ac%t(1)%ft(.rockbox/playername.txt)
#
# Time Elapsed/Remaining
%V(3,73,122,12,1)
diff --git a/wps/cabbiev2.128x96x2.wps b/wps/cabbiev2.128x96x2.wps
index 43d7adc197..17977a973c 100644
--- a/wps/cabbiev2.128x96x2.wps
+++ b/wps/cabbiev2.128x96x2.wps
@@ -53,4 +53,4 @@
%s%ac%?id<%id|%?d(1)<%d(1)|%(root%)>>
%s%ac%?it<%it|%fn>
%s%ac%?ia<%ia|%?iA<%iA|%?d(2)<%d(2)|%(root%)>>>
-%s%Sx(Next:) %ac%It
+%s%t(300)%Sx(Next:) %ac%It;%s%ac%t(1)%ft(.rockbox/playername.txt)
diff --git a/wps/cabbiev2.132x80x16.wps b/wps/cabbiev2.132x80x16.wps
index 39e35c2e2c..c1c6436f94 100644
--- a/wps/cabbiev2.132x80x16.wps
+++ b/wps/cabbiev2.132x80x16.wps
@@ -57,11 +57,11 @@
%s%al%?id<%id|%?d(1)<%d(1)|%(root%)>>
%s%al%?it<%it|%fn>
%s%al%?ia<%ia|%?iA<%iA|%?d(2)<%d(2)|%(root%)>>>
-%s%al%Sx(Next:) %?It<%It|%Fn>
+%s%t(300)%al%Sx(Next:) %?It<%It|%Fn>;%s%al%t(1)%ft(.rockbox/playername.txt)
#
# Track Info - No Album Art
%Vl(b,0,10,-,48,1)
%s%ac%?id<%id|%?d(1)<%d(1)|%(root%)>>
%s%ac%?it<%it|%fn>
%s%ac%?ia<%ia|%?iA<%iA|%?d(2)<%d(2)|%(root%)>>>
-%s%ac%Sx(Next:) %?It<%It|%Fn>
+%s%t(300)%ac%Sx(Next:) %?It<%It|%Fn>;%s%ac%t(1)%ft(.rockbox/playername.txt)
diff --git a/wps/cabbiev2.138x110x2.wps b/wps/cabbiev2.138x110x2.wps
index b27b622004..88f97aeecd 100644
--- a/wps/cabbiev2.138x110x2.wps
+++ b/wps/cabbiev2.138x110x2.wps
@@ -61,7 +61,7 @@
%s%al%?id<%id|%?d(1)<%d(1)|%(root%)>>
%s%al%?it<%it|%fn>
%s%al%?ia<%ia|%?iA<%iA|%?d(2)<%d(2)|%(root%)>>>
-%s%al%Sx(Next Track:)
+%s%t(300)%al%Sx(Next Track:);%s%al%t(1)%ft(.rockbox/playername.txt)
%s%al%?It<%It|%Fn>
#
# Track Info - No Album Art
@@ -69,5 +69,5 @@
%s%ac%?id<%id|%?d(1)<%d(1)|%(root%)>>
%s%ac%?it<%it|%fn>
%s%ac%?ia<%ia|%?iA<%iA|%?d(2)<%d(2)|%(root%)>>>
-%s%ac%Sx(Next Track:)
+%s%t(300)%ac%Sx(Next Track:);%s%ac%t(1)%ft(.rockbox/playername.txt)
%s%ac%?It<%It|%Fn>
diff --git a/wps/cabbiev2.160x128x1.wps b/wps/cabbiev2.160x128x1.wps
index 3d7eb51735..b5491ca835 100644
--- a/wps/cabbiev2.160x128x1.wps
+++ b/wps/cabbiev2.160x128x1.wps
@@ -55,5 +55,5 @@
%s%ac%?it<%it|%fn>
%s%ac%?ia<%ia|%?iA<%iA|%?d(2)<%d(2)|%(root%)>>>
-%ac%Sx(Next Track:)
+%ac%t(300)%Sx(Next Track:);%ac%t(1)%ft(.rockbox/playername.txt)
%s%ac%?It<%It|%Fn>
diff --git a/wps/cabbiev2.160x128x16.wps b/wps/cabbiev2.160x128x16.wps
index 10f16077c0..284bbe53dc 100644
--- a/wps/cabbiev2.160x128x16.wps
+++ b/wps/cabbiev2.160x128x16.wps
@@ -62,7 +62,7 @@
%s%al%?it<%it|%fn>
%s%al%?ia<%ia|%?iA<%iA|%?d(2)<%d(2)|%(root%)>>>
-%Sx(Next Track:)
+%t(300)%Sx(Next Track:);%t(1)%ft(.rockbox/playername.txt)
%s%?It<%It|%Fn>
#
# Track Info - No Album Art
@@ -71,5 +71,5 @@
%s%ac%?it<%it|%fn>
%s%ac%?ia<%ia|%?iA<%iA|%?d(2)<%d(2)|%(root%)>>>
-%ac%Sx(Next Track:)
+%ac%t(300)%Sx(Next Track:);%ac%t(1)%ft(.rockbox/playername.txt)
%s%ac%?It<%It|%Fn>
diff --git a/wps/cabbiev2.160x128x2.wps b/wps/cabbiev2.160x128x2.wps
index 5c0a172a1e..368fd91cea 100644
--- a/wps/cabbiev2.160x128x2.wps
+++ b/wps/cabbiev2.160x128x2.wps
@@ -62,7 +62,7 @@
%s%al%?it<%it|%fn>
%s%al%?ia<%ia|%?iA<%iA|%?d(2)<%d(2)|%(root%)>>>
-%s%al%Sx(Next Track:)
+%s%t(300)%al%Sx(Next Track:);%s%al%t(1)%ft(.rockbox/playername.txt)
%s%al%?It<%It|%Fn>
#
# Track Info - No Album Art
@@ -71,5 +71,5 @@
%s%ac%?it<%it|%fn>
%s%ac%?ia<%ia|%?iA<%iA|%?d(2)<%d(2)|%(root%)>>>
-%ac%Sx(Next Track:)
+%ac%t(300)%Sx(Next Track:);%ac%t(1)%ft(.rockbox/playername.txt)
%s%ac%?It<%It|%Fn>
diff --git a/wps/cabbiev2.176x132x16.wps b/wps/cabbiev2.176x132x16.wps
index a8b599ea3e..0535c613b9 100644
--- a/wps/cabbiev2.176x132x16.wps
+++ b/wps/cabbiev2.176x132x16.wps
@@ -62,7 +62,7 @@
%s%al%?it<%it|%fn>
%s%al%?ia<%ia|%?iA<%iA|%?d(2)<%d(2)|%(root%)>>>
-%s%al%Sx(Next Track:)
+%s%t(300)%al%Sx(Next Track:);%s%al%t(1)%ft(.rockbox/playername.txt)
%s%al%?It<%It|%Fn>
#
# Track Info - No Album Art
@@ -71,5 +71,5 @@
%s%ac%?it<%it|%fn>
%s%ac%?ia<%ia|%?iA<%iA|%?d(2)<%d(2)|%(root%)>>>
-%ac%Sx(Next Track:)
+%ac%t(300)%Sx(Next Track:);%ac%t(1)%ft(.rockbox/playername.txt)
%s%ac%?It<%It|%Fn>
diff --git a/wps/cabbiev2.176x220x16.wps b/wps/cabbiev2.176x220x16.wps
index 6281f6cc27..55d27935fa 100644
--- a/wps/cabbiev2.176x220x16.wps
+++ b/wps/cabbiev2.176x220x16.wps
@@ -69,6 +69,6 @@
%s%ac%?ia<%ia|%?iA<%iA|%?d(2)<%d(2)|%(root%)>>>
%s%ac%?iy<%iy|>
-%ac%Sx(Next Track:)
+%ac%t(300)%Sx(Next Track:);%ac%t(1)%ft(.rockbox/playername.txt)
%s%ac%?It<%It|%Fn>
%s%ac%?Ia<%Ia|%?IA<%IA>>
diff --git a/wps/cabbiev2.220x176x16.wps b/wps/cabbiev2.220x176x16.wps
index 3963aa364a..674110f665 100644
--- a/wps/cabbiev2.220x176x16.wps
+++ b/wps/cabbiev2.220x176x16.wps
@@ -62,7 +62,7 @@
%s%al%?it<%it|%fn>
%s%al%?ia<%ia|%?iA<%iA|%?d(2)<%d(2)|%(root%)>>>
-%s%al%Sx(Next Track:)
+%s%t(300)%al%Sx(Next Track:);%s%al%t(1)%ft(.rockbox/playername.txt)
%s%al%?It<%It|%Fn>
#
# Track Info - No Album Art
@@ -71,5 +71,5 @@
%s%ac%?it<%it|%fn>
%s%ac%?ia<%ia|%?iA<%iA|%?d(2)<%d(2)|%(root%)>>>
-%ac%Sx(Next Track:)
+%ac%t(300)%Sx(Next Track:);%ac%t(1)%ft(.rockbox/playername.txt)
%s%ac%?It<%It|%Fn>
diff --git a/wps/cabbiev2.240x320x16.mini2440.wps b/wps/cabbiev2.240x320x16.mini2440.wps
index 14d65325d2..b6ce50a8bf 100644
--- a/wps/cabbiev2.240x320x16.mini2440.wps
+++ b/wps/cabbiev2.240x320x16.mini2440.wps
@@ -28,9 +28,9 @@
%?C<|>
%?C<%s%ac%?id<%id|%?d(1)<%d(1)|%(root%)>>|%ac%s%?It<%It|%Fn>>
%?C<%s%ac%?it<%it|%fn>|>
-%?C<%s%ac%?ia<%ia|%?iA<%iA|%?d(2)<%d(2)|%(root%)>>|%ac%Sx(Next Track:)>>
+%t(300)%?C<%s%ac%?ia<%ia|%?iA<%iA|%?d(2)<%d(2)|%(root%)>>|%ac%Sx(Next Track:)>>;%s%ac%t(1)%ft(.rockbox/playername.txt)
%?C<|%s%ac%?Ia<%Ia|%?IA<%IA|%?D(2)<%D(2)|%(root%)>>>>
-%?C<%s%ac%Sx(Next:) %?Ia<%Ia|%?IA<%IA|%?D(2)<%D(2)|%(root%)>>> - %?It<%It|%Fn>|%s%ac%?Id<%Id|%?D(1)<%D(1)|%(root%)>>>
+%t(300)%?C<%s%ac%Sx(Next:) %?Ia<%Ia|%?IA<%IA|%?D(2)<%D(2)|%(root%)>>> - %?It<%It|%Fn>|%s%ac%?Id<%Id|%?D(1)<%D(1)|%(root%)>>>;%s%ac%t(1)%ft(.rockbox/playername.txt)
%pc%ac%?Sr<%pe %Sx(of) %pp|%pp %Sx(of) %pe>%ar%pr
diff --git a/wps/cabbiev2.240x320x16.wps b/wps/cabbiev2.240x320x16.wps
index 95a056b123..2fabba5e35 100644
--- a/wps/cabbiev2.240x320x16.wps
+++ b/wps/cabbiev2.240x320x16.wps
@@ -61,7 +61,7 @@
%s%ac%?id<%id|%?d(1)<%d(1)|%(root%)>>
%s%ac%?it<%it|%fn>
%s%ac%?ia<%ia|%?iA<%iA|%?d(2)<%d(2)|%(root%)>>>
-%s%ac%Sx(Next:) %?Ia<%Ia|%?IA<%IA|%?D(2)<%D(2)|%(root%)>>> - %?It<%It|%Fn>
+%s%t(300)%ac%Sx(Next:) %?Ia<%Ia|%?IA<%IA|%?D(2)<%D(2)|%(root%)>>> - %?It<%It|%Fn>;%s%ac%t(1)%ft(.rockbox/playername.txt)
#
# Track Info - No Album Art
%Vl(b,0,45,-,198,1)
@@ -73,7 +73,7 @@
%ac%?ig<%ig|>
%ac%?fv<%(vbr%) |>%fb kbit/s %fc
-%ac%Sx(Next:)
+%ac%t(300)%Sx(Next:);%ac%t(1)%ft(.rockbox/playername.txt)
%s%ac%?Id<%Id|%?D(1)<%D(1)|%(root%)>>
%ac%s%?It<%It|%Fn>
%s%ac%?Ia<%Ia|%?IA<%IA|%?D(2)<%D(2)|%(root%)>>>
diff --git a/wps/cabbiev2.240x400x16.wps b/wps/cabbiev2.240x400x16.wps
index 7bed444259..129942fe75 100644
--- a/wps/cabbiev2.240x400x16.wps
+++ b/wps/cabbiev2.240x400x16.wps
@@ -23,9 +23,9 @@
%?C<|>
%?C<%s%ac%?id<%id|%?d(1)<%d(1)|%(root%)>>|%ac%s%?It<%It|%Fn>>
%?C<%s%ac%?it<%it|%fn>|>
-%?C<%s%ac%?ia<%ia|%?iA<%iA|%?d(2)<%d(2)|%(root%)>>>|%ac%Sx(Next Track:)>
+%t(300)%?C<%s%ac%?ia<%ia|%?iA<%iA|%?d(2)<%d(2)|%(root%)>>>|%ac%Sx(Next Track:)>;%s%ac%t(1)%ft(.rockbox/playername.txt)
%?C<|%s%ac%?Ia<%Ia|%?IA<%IA|%?D(2)<%D(2)|%(root%)>>>>
-%?C<%s%ac%Sx(Next:) %?Ia<%Ia|%?IA<%IA|%?D(2)<%D(2)|%(root%)>>> - %?It<%It|%Fn>|%s%ac%?Id<%Id|%?D(1)<%D(1)|%(root%)>>>
+%t(300)%?C<%s%ac%Sx(Next:) %?Ia<%Ia|%?IA<%IA|%?D(2)<%D(2)|%(root%)>>> - %?It<%It|%Fn>|%s%ac%?Id<%Id|%?D(1)<%D(1)|%(root%)>>>;%s%ac%t(1)%ft(.rockbox/playername.txt)
%pc%ac%?Sr<%pe %Sx(of) %pp|%pp %Sx(of) %pe>%ar%pr
diff --git a/wps/cabbiev2.320x240x16.mrobe500.wps b/wps/cabbiev2.320x240x16.mrobe500.wps
index d7bd9f2190..486f0fad57 100644
--- a/wps/cabbiev2.320x240x16.mrobe500.wps
+++ b/wps/cabbiev2.320x240x16.mrobe500.wps
@@ -35,7 +35,7 @@
%s%al%?id<%id|%?d(1)<%d(1)|%(root%)>>
#%s%al%iy
-%s%al%Sx(Next Track:)
+%s%t(300)%al%Sx(Next Track:);%s%al%t(1)%ft(.rockbox/playername.txt)
%s%al%?It<%It|%Fn>
%s%al%?Ia<%Ia|%IA>
@@ -45,7 +45,7 @@
%s%ac%?ia<%ia|%?iA<%iA|%?d(2)<%d(2)|%(root%)>>>
%s%ac%iy
-%ac%Sx(Next Track:)
+%ac%t(300)%Sx(Next Track:);%ac%t(1)%ft(.rockbox/playername.txt)
%s%ac%?It<%It|%Fn>
%s%ac%?Ia<%Ia|%IA>
diff --git a/wps/cabbiev2.320x240x16.wps b/wps/cabbiev2.320x240x16.wps
index 0aff77db77..f41da43eb9 100644
--- a/wps/cabbiev2.320x240x16.wps
+++ b/wps/cabbiev2.320x240x16.wps
@@ -63,7 +63,7 @@
%s%al%?ia<%ia|%?iA<%iA|%?d(2)<%d(2)|%(root%)>>>
%s%al%?iy<%iy>
-%s%al%Sx(Next Track:)
+%s%t(300)%al%Sx(Next Track:);%s%al%t(1)%ft(.rockbox/playername.txt)
%s%al%?It<%It|%Fn>
%s%al%?Ia<%Ia|%?IA<%IA>>
#
@@ -74,6 +74,6 @@
%s%ac%?ia<%ia|%?iA<%iA|%?d(2)<%d(2)|%(root%)>>>
%s%ac%?iy<%iy>
-%ac%Sx(Next Track:)
+%ac%t(300)%Sx(Next Track:);%ac%t(1)%ft(.rockbox/playername.txt)
%s%ac%?It<%It|%Fn>
%s%ac%?Ia<%Ia|%?IA<%IA>>
diff --git a/wps/cabbiev2.320x480x16.wps b/wps/cabbiev2.320x480x16.wps
index 77effcef4a..c651398f24 100644
--- a/wps/cabbiev2.320x480x16.wps
+++ b/wps/cabbiev2.320x480x16.wps
@@ -35,7 +35,7 @@
%ac%?ig<%ig|>
%ac%?fv<%(vbr%) |>%fb kbit/s %fc
%s%ac%?Ia<%Ia|%?IA<%IA|%?D(2)<%D(2)|%(root%)>>>
-%ac%Sx(Next Track:)
+%ac%t(300)%Sx(Next Track:);%ac%t(1)%ft(.rockbox/playername.txt)
%ac%s%?It<%It|%Fn>
#
# album art viewport
@@ -53,7 +53,7 @@
# next track info - AA
%Vl(d,0,338,-,-120,-)
-%?C<%s%ac%Sx(Next:) %?Ia<%Ia|%?IA<%IA|%?D(2)<%D(2)|%(root%)>>> - %?It<%It|%Fn>|%s%ac%?Id<%Id|%?D(1)<%D(1)|%(root%)>>>
+%t(300)%?C<%s%ac%Sx(Next:) %?Ia<%Ia|%?IA<%IA|%?D(2)<%D(2)|%(root%)>>> - %?It<%It|%Fn>|%s%ac%?Id<%Id|%?D(1)<%D(1)|%(root%)>>>;%s%ac%t(1)%ft(.rockbox/playername.txt)
# playtime
%V(15,398,290,30,-)
diff --git a/wps/cabbiev2.360x400x16.wps b/wps/cabbiev2.360x400x16.wps
index e98232e5df..8b3eceeadc 100644
--- a/wps/cabbiev2.360x400x16.wps
+++ b/wps/cabbiev2.360x400x16.wps
@@ -62,7 +62,7 @@
%s%ac%?it<%it|%fn>
%s%ac%?ia<%ia|%?iA<%iA|%?d(2)<%d(2)|%(root%)>>>
-%s%ac%Sx(Next:) %?Ia<%Ia|%?IA<%IA|%?D(2)<%D(2)|%(root%)>>> - %?It<%It|%Fn>
+%s%t(300)%ac%Sx(Next:) %?Ia<%Ia|%?IA<%IA|%?D(2)<%D(2)|%(root%)>>> - %?It<%It|%Fn>;%s%ac%t(1)%ft(.rockbox/playername.txt)
#
# Track Info - No Album Art
%Vl(b,0,56,-,247,1)
@@ -75,7 +75,7 @@
%ac%?fv<%(vbr%) |>%fb kbit/s %fc
-%ac%Sx(Next:)
+%ac%t(300)%Sx(Next:);%ac%t(1)%ft(.rockbox/playername.txt)
%s%ac%?Id<%Id|%?D(1)<%D(1)|%(root%)>>
%ac%s%?It<%It|%Fn>
%s%ac%?Ia<%Ia|%?IA<%IA|%?D(2)<%D(2)|%(root%)>>>
diff --git a/wps/cabbiev2.400x240x16.wps b/wps/cabbiev2.400x240x16.wps
index 469ee3d2f1..2a9f4ca6ac 100644
--- a/wps/cabbiev2.400x240x16.wps
+++ b/wps/cabbiev2.400x240x16.wps
@@ -63,7 +63,7 @@
%s%al%?ia<%ia|%?iA<%iA|%?d(2)<%d(2)|%(root%)>>>
%s%al%?iy<%iy>
-%s%al%Sx(Next Track:)
+%s%t(300)%al%Sx(Next Track:);%s%al%t(1)%ft(.rockbox/playername.txt)
%s%al%?It<%It|%Fn>
%s%al%?Ia<%Ia|%?IA<%IA>>
#
@@ -74,6 +74,6 @@
%s%ac%?ia<%ia|%?iA<%iA|%?d(2)<%d(2)|%(root%)>>>
%s%ac%?iy<%iy>
-%ac%Sx(Next Track:)
+%ac%t(300)%Sx(Next Track:);%ac%t(1)%ft(.rockbox/playername.txt)
%s%ac%?It<%It|%Fn>
%s%ac%?Ia<%Ia|%?IA<%IA>>
diff --git a/wps/cabbiev2.480x800x16.wps b/wps/cabbiev2.480x800x16.wps
index 1b4994eba4..61973c4c62 100644
--- a/wps/cabbiev2.480x800x16.wps
+++ b/wps/cabbiev2.480x800x16.wps
@@ -36,7 +36,7 @@
%ac%?ig<%ig|>
%ac%?fv<%(vbr%) |>%fb kbit/s %fc
%s%ac%?Ia<%Ia|%?IA<%IA|%?D(2)<%D(2)|%(root%)>>>
-%ac%Sx(Next Track:)
+%ac%t(300)%Sx(Next Track:);%ac%t(1)%ft(.rockbox/playername.txt)
%ac%s%?It<%It|%Fn>
#
# album art viewport
@@ -54,7 +54,7 @@
# next track info - AA
%Vl(d,0,550,-,-200,-)
-%?C<%s%ac%Sx(Next:) %?Ia<%Ia|%?IA<%IA|%?D(2)<%D(2)|%(root%)>>> - %?It<%It|%Fn>|%s%ac%?Id<%Id|%?D(1)<%D(1)|%(root%)>>>
+%t(300)%?C<%s%ac%Sx(Next:) %?Ia<%Ia|%?IA<%IA|%?D(2)<%D(2)|%(root%)>>> - %?It<%It|%Fn>|%s%ac%?Id<%Id|%?D(1)<%D(1)|%(root%)>>>;%s%ac%t(1)%ft(.rockbox/playername.txt)
# playtime
%V(20,660,440,36,-)
diff --git a/wps/cabbiev2.800x480x16.wps b/wps/cabbiev2.800x480x16.wps
index 525f45e6a9..4720909bb2 100644
--- a/wps/cabbiev2.800x480x16.wps
+++ b/wps/cabbiev2.800x480x16.wps
@@ -21,7 +21,7 @@
%s%ac%?it<%it|%fn>
%s%ac%?ia<%ia|%?iA<%iA|%?d(2)<%d(2)|%(root%)>>>
-%ac%Sx(Next Track:)
+%ac%t(300)%Sx(Next Track:);%ac%t(1)%ft(.rockbox/playername.txt)
%s%ac%?Ia<%Ia|%?IA<%IA|%?D(2)<%D(2)|%(root%)>>> - %?It<%It|%Fn>
#
@@ -38,7 +38,7 @@
%s%al%?it<%it|%fn>
%s%al%?ia<%ia|%?iA<%iA|%?d(2)<%d(2)|%(root%)>>>
-%s%al%Sx(Next Track:)
+%s%t(300)%al%Sx(Next Track:);%s%al%t(1)%ft(.rockbox/playername.txt)
%s%al%?Ia<%Ia|%?IA<%IA|%?D(2)<%D(2)|%(root%)>>> - %?It<%It|%Fn>
# playtime
diff --git a/wps/cabbiev2.96x96x16.wps b/wps/cabbiev2.96x96x16.wps
index 1ac35c12e4..fcef7852e2 100644
--- a/wps/cabbiev2.96x96x16.wps
+++ b/wps/cabbiev2.96x96x16.wps
@@ -49,7 +49,7 @@
#
# Next Track Info
%V(2,56,92,8,1)
-%s%ac%Sx(Next:) %?It<%It|%Fn>
+%s%t(300)%ac%Sx(Next:) %?It<%It|%Fn>;%s%ac%t(1)%ft(.rockbox/playername.txt)
#
# Time Elapsed/Remaining
%V(2,73,92,8,1)