aboutsummaryrefslogtreecommitdiffstats
path: root/src/strfsong.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/strfsong.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/strfsong.c b/src/strfsong.c
index 287fcbdce..df622a2bb 100644
--- a/src/strfsong.c
+++ b/src/strfsong.c
@@ -204,9 +204,21 @@ _strfsong(gchar *s,
else if (strncmp("%time%", p, n) == 0)
{
if (song->time != MPD_SONG_NO_TIME)
- temp = g_strdup_printf("%d:%02d",
- song->time / 60,
- song->time % 60 + 1);
+ {
+ if (song->time > 3600)
+ {
+ temp = g_strdup_printf("%d:%02d:%02d",
+ song->time / 3600,
+ (song->time % 3600) / 60,
+ song->time % 60);
+ }
+ else
+ {
+ temp = g_strdup_printf("%d:%02d",
+ song->time / 60,
+ song->time % 60);
+ }
+ }
}
if( temp == NULL)