mediaplayer: qml: add hour digits to time2str function
[apps/mediaplayer.git] / app / MediaPlayer.qml
index ec7b4e0..85328a9 100644 (file)
@@ -40,7 +40,7 @@ ApplicationWindow {
         property string status: "stopped"
 
         function time2str(value) {
-            return Qt.formatTime(new Date(value), 'mm:ss')
+            return Qt.formatTime(new Date(value), (value > 3600000) ? 'hh:mm:ss' : 'mm:ss')
         }
     }
 
@@ -139,7 +139,7 @@ ApplicationWindow {
                                 visible: player.av_connected === false
                                 offImage: './images/AGL_MediaPlayer_Loop_Inactive.svg'
                                 onImage: './images/AGL_MediaPlayer_Loop_Active.svg'
-                                onClicked: { mediaplayer.loop(checked) }
+                                onClicked: { mediaplayer.loop(checked ? "playlist" : "off") }
                             }
                         }
                         ColumnLayout {