[runtime] use [H:]MM:SS when formatting up runtime labels in lists
authorJonathan Marshall <jmarshall@never.you.mind>
Fri, 2 Nov 2012 06:33:00 +0000 (19:33 +1300)
committerJonathan Marshall <jmarshall@never.you.mind>
Sun, 25 Nov 2012 22:12:49 +0000 (11:12 +1300)
xbmc/utils/LabelFormatter.cpp

index 5bbeb8c..e089921 100644 (file)
@@ -222,7 +222,7 @@ CStdString CLabelFormatter::GetMaskContent(const CMaskString &mask, const CFileI
       if (movie)
         nDuration = movie->GetDuration();
       if (nDuration > 0)
-        value = StringUtils::SecondsToTimeString(nDuration);
+        value = StringUtils::SecondsToTimeString(nDuration, (nDuration >= 3600) ? TIME_FORMAT_H_MM_SS : TIME_FORMAT_MM_SS);
       else if (item->m_dwSize > 0)
         value = StringUtils::SizeToString(item->m_dwSize);
     }