diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2016-06-20 23:08:22 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2016-06-20 23:15:47 +0200 |
commit | 9de92b6dd2bd906f6a64fce7c90a6aff0dbb27a2 (patch) | |
tree | c654b7691e8bc92bd1726554e0d353604ebb4d71 /helpers/__init__.py | |
parent | d479af33afa54fee7c22701c6012a1579ead395f (diff) | |
download | MusicSampler-9de92b6dd2bd906f6a64fce7c90a6aff0dbb27a2.tar.gz MusicSampler-9de92b6dd2bd906f6a64fce7c90a6aff0dbb27a2.tar.zst MusicSampler-9de92b6dd2bd906f6a64fce7c90a6aff0dbb27a2.zip |
Added music name, currently playing musics, pause/unpause
Diffstat (limited to 'helpers/__init__.py')
-rw-r--r-- | helpers/__init__.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/helpers/__init__.py b/helpers/__init__.py index d0d3f46..b3ab1eb 100644 --- a/helpers/__init__.py +++ b/helpers/__init__.py | |||
@@ -41,7 +41,10 @@ def parse_config(mapping): | |||
41 | if argument == 'file': | 41 | if argument == 'file': |
42 | filename = action[action_name]['file'] | 42 | filename = action[action_name]['file'] |
43 | if filename not in seen_files: | 43 | if filename not in seen_files: |
44 | seen_files[filename] = MusicFile(filename, file_lock, channel_id) | 44 | if 'name' in action[action_name]: |
45 | seen_files[filename] = MusicFile(filename, file_lock, channel_id, name = action[action_name]['name']) | ||
46 | else: | ||
47 | seen_files[filename] = MusicFile(filename, file_lock, channel_id) | ||
45 | channel_id = channel_id + 1 | 48 | channel_id = channel_id + 1 |
46 | 49 | ||
47 | action_args['music'] = seen_files[filename] | 50 | action_args['music'] = seen_files[filename] |
@@ -62,4 +65,4 @@ def parse_config(mapping): | |||
62 | key.set_color(config['key_properties'][key_property]['color']) | 65 | key.set_color(config['key_properties'][key_property]['color']) |
63 | 66 | ||
64 | # Return the number of channels reserved | 67 | # Return the number of channels reserved |
65 | return channel_id + 1 | 68 | return (channel_id + 1, seen_files) |