mirror of
https://github.com/cyberboy666/r_e_c_u_r.git
synced 2025-12-05 16:00:06 +01:00
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:
26
actions.py
26
actions.py
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user