aboutsummaryrefslogtreecommitdiff
path: root/components/video.py
diff options
context:
space:
mode:
authortassaron2017-06-22 22:23:04 -0400
committertassaron2017-06-22 22:23:04 -0400
commit3c903794e3588560f2b9d342214009d55a675d5a (patch)
tree8b1b1a55343d2489b90c14020d5b174db5c7d7ea /components/video.py
parent49cda1bf3aa1800459d1085496291bec90ae6a5a (diff)
more commandline component options
commandline options that existed before the redesign are now back
Diffstat (limited to 'components/video.py')
-rw-r--r--components/video.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/components/video.py b/components/video.py
index 66c98ce..1d250bd 100644
--- a/components/video.py
+++ b/components/video.py
@@ -222,21 +222,21 @@ class Component(__base__.Component):
self.chunkSize = 4*width*height
def command(self, arg):
- if not arg.startswith('preset='):
- if os.path.exists(arg):
+ if not arg.startswith('preset=') and '=' in arg:
+ key, arg = arg.split('=', 1)
+ if key == 'path' and os.path.exists(arg):
if os.path.splitext(arg)[1] in self.core.videoFormats:
- self.videoPath = arg
- self.scale = 100
- self.loopVideo = True
- return True
+ self.page.lineEdit_video.setText(arg)
+ self.page.spinBox_scale.setValue(100)
+ self.page.checkBox_loop.setChecked(True)
+ return
else:
print("Not a supported video format")
quit(1)
super().command(arg)
def commandHelp(self):
- print('Give a complete filepath to a video to load that '
- 'video with default settings.')
+ print('Load a video:\n path=/filepath/to/video.mp4')
def scale(scale, width, height, returntype=None):
width = (float(width) / 100.0) * float(scale)