diff --git a/display_centre.py b/display_centre.py index ee7f022..652ca6c 100644 --- a/display_centre.py +++ b/display_centre.py @@ -168,9 +168,14 @@ load_display(display) select_current_browser_index() - def key(event): - if(event.char in ['0', '1', '2']): + print event.char + if(event.char == '/'): + print 'it\'s cleared!' + data_centre.clear_all_banks() + refresh_display() + + if(event.char in ['0', '1', '2','3','4','5','6','7']): data_centre.update_next_bank_number(int(event.char)) # video_driver.next_player.reload_content() elif(event.char in ['\r']): @@ -216,6 +221,7 @@ frame.bind("", up_key) frame.bind("", down_key) frame.bind("", backspace_key) + frame.pack() frame.focus_set() diff --git a/display_data.json b/display_data.json index 33cbc54..23c16f7 100644 --- a/display_data.json +++ b/display_data.json @@ -1,107 +1 @@ -[ - { - "start": -1, - "length": -1, - "end": -1, - "location": "/home/pi/pp_home/media/samplerloop3s3.mp4", - "name": "spooky_video_2.mp4" - }, - { - "start": -1, - "length": -1, - "end": -1, - "location": "/home/pi/pp_home/media/samplerloop3s2.mp4", - "name": "random_video_1.mp4" - }, - { - "start": -1, - "length": -1, - "end": -1, - "location": "/home/pi/pp_home/media/samplerloop3s.mp4", - "name": "random_video_2.mp4" - }, - { - "start": -1, - "length": -1, - "end": -1, - "location": "", - "name": "" - }, - { - "start": -1, - "length": -1, - "end": -1, - "location": "", - "name": "" - }, - { - "start": -1, - "length": -1, - "end": -1, - "location": "", - "name": "" - }, - { - "start": -1, - "length": -1, - "end": -1, - "location": "", - "name": "" - }, - { - "start": -1, - "length": -1, - "end": -1, - "location": "", - "name": "" - }, - { - "start": -1, - "length": -1, - "end": -1, - "location": "", - "name": "" - }, - { - "start": -1, - "length": -1, - "end": -1, - "location": "", - "name": "" - }, - { - "start": -1, - "length": -1, - "end": -1, - "location": "", - "name": "" - }, - { - "start": -1, - "length": -1, - "end": -1, - "location": "", - "name": "" - }, - { - "start": -1, - "length": -1, - "end": -1, - "location": "", - "name": "" - }, - { - "start": -1, - "length": -1, - "end": -1, - "location": "", - "name": "" - }, - { - "start": -1, - "length": -1, - "end": -1, - "location": "", - "name": "" - } -] \ No newline at end of file +[{"start": -1, "length": -1, "end": -1, "location": "", "name": ""}, {"start": -1, "length": -1, "end": -1, "location": "", "name": ""}, {"start": -1, "length": -1, "end": -1, "location": "", "name": ""}, {"start": -1, "length": -1, "end": -1, "location": "", "name": ""}, {"start": -1, "length": -1, "end": -1, "location": "", "name": ""}, {"start": -1, "length": -1, "end": -1, "location": "", "name": ""}, {"start": -1, "length": -1, "end": -1, "location": "", "name": ""}, {"start": -1, "length": -1, "end": -1, "location": "", "name": ""}, {"start": -1, "length": -1, "end": -1, "location": "", "name": ""}, {"start": -1, "length": -1, "end": -1, "location": "", "name": ""}, {"start": -1, "length": -1, "end": -1, "location": "", "name": ""}, {"start": -1, "length": -1, "end": -1, "location": "", "name": ""}, {"start": -1, "length": -1, "end": -1, "location": "", "name": ""}, {"start": -1, "length": -1, "end": -1, "location": "", "name": ""}, {"start": -1, "length": -1, "end": -1, "location": "", "name": ""}] \ No newline at end of file diff --git a/video_centre.py b/video_centre.py index 58c7f3e..f4b06d2 100644 --- a/video_centre.py +++ b/video_centre.py @@ -93,7 +93,7 @@ class video_driver(object): def get_info_for_video_display(self): if has_omx: return self.current_player.bank_number, self.current_player.status, self.next_player.bank_number, \ - self.next_player.status, self.current_player.position, self.current_player.length + self.next_player.status, self.current_player.get_position(), self.current_player.length else: return 0, 'test', 1, 'test', 0, 10 @@ -146,6 +146,7 @@ class video_player(object): self.start = next_context['start'] self.end = next_context['end'] self.video_name = next_context['name'] + self.bank_number = next_context['bank_number'] def reload_content(self): self.status = 'RELOADING'