Verified Commit 3aee1411 authored by Tijder's avatar Tijder

Show hours of audio item

parent ea23b47d
Pipeline #201196 passed with stage
in 6 minutes and 36 seconds
......@@ -51,7 +51,13 @@ class AlbumItem(Gtk.Box):
self._index_label.set_text(self._item.index)
con_sec, con_min, con_hour = self.__convertMillis(int(self._item.duration))
self._time_label.set_text(str("{0}:{1}".format(int(con_min), format(int(con_sec), '02'))))
time = ""
if con_hour >= 1:
time = str("{0}:{1}:{2}".format(int(con_hour), int(con_min), format(int(con_sec), '02')))
else:
time = str("{0}:{1}".format(int(con_min), format(int(con_sec), '02')))
self._time_label.set_text(time)
def __convertMillis(self, millis):
seconds=(millis/1000)%60
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment