From 9f9f07b2d6f9548897b3fab0a399c4cd9f0058f0 Mon Sep 17 00:00:00 2001 From: TanSaturn Date: Wed, 17 Oct 2018 23:30:06 -0700 Subject: [PATCH] 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. --- .DS_Store | Bin 0 -> 6148 bytes actions.py | 26 ++++++++++++++++++++++-- json_objects/keypad_action_mapping.json | 4 ++-- json_objects/settings_default.json | 14 ++++++++++++- 4 files changed, 39 insertions(+), 5 deletions(-) create mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..3dc3e366523ddbc1ca383f9be55cbc8dce5058c8 GIT binary patch literal 6148 zcmeHKOHRWu5PbthihxCzEPVxT5LM*_901fNm5M5YNW0I`dGiS(B5YAXGm__d?3uCs zq}Uk%vN|>Qz!E^krYPE(5gneLx(MehqF9bS4rtLg{q``E=p2W1?-d$!IAVt{``>h( zo#7TQ=sEq0C+ZEY7F#;oA=QZ|$B#}sQZYJRttB+31lECr zBWEb$p+parC^5vtIbOoA4jddk91_Kc#L8pwBDOm77juWyj;WJ@WMIm`rJGBA{~!3t z%oh36khGG4WZ<7MAdB_mdc{M<+xqQz`qmb 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 diff --git a/json_objects/keypad_action_mapping.json b/json_objects/keypad_action_mapping.json index 839e2e8..5f7fb02 100644 --- a/json_objects/keypad_action_mapping.json +++ b/json_objects/keypad_action_mapping.json @@ -1,13 +1,13 @@ { "a": { "NAV_BROWSER": ["move_browser_selection_up"], - "PLAYER": ["seek_back_on_player"], + "PLAYER": ["seek_back_on_player", "decrease_seek_time"], "NAV_SETTINGS": ["move_settings_selection_up"], "LENGTH_SET": ["return_to_default_control_mode"] }, "b": { "NAV_BROWSER": ["move_browser_selection_down"], - "PLAYER": ["seek_forward_on_player"], + "PLAYER": ["seek_forward_on_player", "increase_seek_time"], "NAV_SETTINGS": ["move_settings_selection_down"], "LENGTH_SET": ["return_to_default_control_mode"] }, diff --git a/json_objects/settings_default.json b/json_objects/settings_default.json index 2a5aef1..a0ed24a 100644 --- a/json_objects/settings_default.json +++ b/json_objects/settings_default.json @@ -198,7 +198,19 @@ "off" ], "value": "off" - } + }, + "SEEK_TIME_JUMP": { + "action": null, + "options": [ + 0.5, + 1, + 5, + 10, + 30 + ], + "value": 5, + "seconds": 30 + } }, "video": { "BACKGROUND_COLOUR": {