aboutsummaryrefslogtreecommitdiff
path: root/music_sampler.py
diff options
context:
space:
mode:
Diffstat (limited to 'music_sampler.py')
-rw-r--r--music_sampler.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/music_sampler.py b/music_sampler.py
index 5e61466..7bd7513 100644
--- a/music_sampler.py
+++ b/music_sampler.py
@@ -18,7 +18,7 @@ class KeyList(RelativeLayout):
18 third_key = StringProperty("") 18 third_key = StringProperty("")
19 19
20 def append(self, value): 20 def append(self, value):
21 self.keylist = [value] + self.keylist 21 self.keylist.insert(0, value)
22 22
23 def on_keylist(self, instance, new_key_list): 23 def on_keylist(self, instance, new_key_list):
24 if len(self.keylist) > 0: 24 if len(self.keylist) > 0:
@@ -44,10 +44,16 @@ class PlayList(RelativeLayout):
44 for music_file in open_files.values(): 44 for music_file in open_files.values():
45 if not music_file.is_playing(): 45 if not music_file.is_playing():
46 continue 46 continue
47
48 text = "{}/{}".format(
49 helpers.duration_to_min_sec(music_file.sound_position),
50 helpers.duration_to_min_sec(music_file.sound_duration)
51 )
52
47 if music_file.is_paused(): 53 if music_file.is_paused():
48 self.playlist.append(["⏸", music_file.name, False]) 54 self.playlist.append(["⏸", music_file.name, text, False])
49 else: 55 else:
50 self.playlist.append(["⏵", music_file.name, True]) 56 self.playlist.append(["⏵", music_file.name, text, True])
51 57
52 58
53class ActionList(RelativeLayout): 59class ActionList(RelativeLayout):