Updated SEEK_TIME controls

This commit is contained in:
TanSaturn
2018-10-18 15:55:12 -07:00
parent 78b0070fe2
commit 7846c36348
3 changed files with 23 additions and 22 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@@ -113,32 +113,32 @@ class Actions(object):
self.video_driver.next_player.toggle_show() self.video_driver.next_player.toggle_show()
def increase_seek_time(self): def increase_seek_time(self):
seek_time = self.data.settings['sampler']['SEEK_TIME_JUMP']['seconds'] for idx, i in enumerate(self.data.settings['sampler']['SEEK_TIME']['options']):
jump = self.data.settings['sampler']['SEEK_TIME_JUMP']['value'] if ((i == self.data.settings['sampler']['SEEK_TIME']['value']) and (idx != 6)):
if seek_time < 60: self.data.settings['sampler']['SEEK_TIME']['value'] = self.data.settings['sampler']['SEEK_TIME']['options'][(idx + 1)]
seek_time += jump break
else: elif idx == 6 and self.data.settings['sampler']['SEEK_TIME']['value'] == 60:
seek_time = 0.5 self.data.settings['sampler']['SEEK_TIME']['value'] = self.data.settings['sampler']['SEEK_TIME']['options'][0]
self.data.settings['sampler']['SEEK_TIME_JUMP']['seconds'] = seek_time break
self.message_handler.set_message('INFO', 'The Seek Time is now ' + str(seek_time) + 's') self.message_handler.set_message('INFO', 'The Seek Time is now ' + str(self.data.settings['sampler']['SEEK_TIME']['value']) + 's')
def decrease_seek_time(self): def decrease_seek_time(self):
seek_time = self.data.settings['sampler']['SEEK_TIME_JUMP']['seconds'] for idx, i in enumerate(self.data.settings['sampler']['SEEK_TIME']['options']):
jump = self.data.settings['sampler']['SEEK_TIME_JUMP']['value'] if ((i == self.data.settings['sampler']['SEEK_TIME']['value']) and (idx != 0)):
if seek_time > 0.5: self.data.settings['sampler']['SEEK_TIME']['value'] = self.data.settings['sampler']['SEEK_TIME']['options'][(idx - 1)]
seek_time -= jump break
else: elif idx == 0 and self.data.settings['sampler']['SEEK_TIME']['value'] == 0.5:
seek_time = 0.5 self.data.settings['sampler']['SEEK_TIME']['value'] = self.data.settings['sampler']['SEEK_TIME']['options'][6]
self.data.settings['sampler']['SEEK_TIME_JUMP']['seconds'] = seek_time break
self.message_handler.set_message('INFO', 'The Seek Time is now ' + str(seek_time) + 's') self.message_handler.set_message('INFO', 'The Seek Time is now ' + str(self.data.settings['sampler']['SEEK_TIME']['value']) + 's')
def seek_forward_on_player(self): def seek_forward_on_player(self):
self.video_driver.current_player.seek(self.data.settings['sampler']['SEEK_TIME_JUMP']['seconds']) self.video_driver.current_player.seek(self.data.settings['sampler']['SEEK_TIME']['value'])
def seek_back_on_player(self): def seek_back_on_player(self):
self.video_driver.current_player.seek(-(self.data.settings['sampler']['SEEK_TIME_JUMP']['seconds'])) self.video_driver.current_player.seek(-(self.data.settings['sampler']['SEEK_TIME']['value']))
def toggle_function(self): def toggle_function(self):
self.data.function_on = not self.data.function_on self.data.function_on = not self.data.function_on

View File

@@ -199,17 +199,18 @@
], ],
"value": "off" "value": "off"
}, },
"SEEK_TIME_JUMP": { "SEEK_TIME": {
"action": null, "action": null,
"options": [ "options": [
0.5, 0.5,
1, 1,
5, 5,
10, 10,
30 15,
30,
60
], ],
"value": 5, "value": 5
"seconds": 30
} }
}, },
"video": { "video": {