Seek Time Adjustment

Added mapping and action to change the seek time using fn + </>.
Parameter added to the sampler settings called SEEK_TIME_JUMP. This parameter sets how much the seek time is adjusted by each time fn + </> is pressed. SEEK_TIME_JUMP also stores the custom seek time.
This commit is contained in:
TanSaturn
2018-10-17 23:30:06 -07:00
parent fa92acca63
commit 9f9f07b2d6
4 changed files with 39 additions and 5 deletions

View File

@@ -112,11 +112,33 @@ class Actions(object):
elif self.data.player_mode == 'next':
self.video_driver.next_player.toggle_show()
def increase_seek_time(self):
seek_time = self.data.settings['sampler']['SEEK_TIME_JUMP']['seconds']
jump = self.data.settings['sampler']['SEEK_TIME_JUMP']['value']
if seek_time < 60:
seek_time += jump
else:
seek_time = 0.5
self.data.settings['sampler']['SEEK_TIME_JUMP']['seconds'] = seek_time
self.message_handler.set_message('INFO', 'The Seek Time is now ' + str(seek_time) + 's')
def decrease_seek_time(self):
seek_time = self.data.settings['sampler']['SEEK_TIME_JUMP']['seconds']
jump = self.data.settings['sampler']['SEEK_TIME_JUMP']['value']
if seek_time > 0.5:
seek_time -= jump
else:
seek_time = 0.5
self.data.settings['sampler']['SEEK_TIME_JUMP']['seconds'] = seek_time
self.message_handler.set_message('INFO', 'The Seek Time is now ' + str(seek_time) + 's')
def seek_forward_on_player(self):
self.video_driver.current_player.seek(30)
self.video_driver.current_player.seek(self.data.settings['sampler']['SEEK_TIME_JUMP']['seconds'])
def seek_back_on_player(self):
self.video_driver.current_player.seek(-30)
self.video_driver.current_player.seek(-(self.data.settings['sampler']['SEEK_TIME_JUMP']['seconds']))
def toggle_function(self):
self.data.function_on = not self.data.function_on