aboutsummaryrefslogtreecommitdiff
path: root/src/components/sound.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/sound.py')
-rw-r--r--src/components/sound.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/components/sound.py b/src/components/sound.py
index 9c114a8..2ffb682 100644
--- a/src/components/sound.py
+++ b/src/components/sound.py
@@ -34,7 +34,16 @@ class Component(Component):
pass
def properties(self):
- return ['static', 'audio']
+ props = ['static', 'audio']
+ if not os.path.exists(self.sound):
+ props.append('error')
+ return props
+
+ def error(self):
+ if not self.sound:
+ return "No audio file selected."
+ if not os.path.exists(self.sound):
+ return "The audio file selected no longer exists!"
def audio(self):
return (self.sound, {})