slash clears banks!

This commit is contained in:
Steven Brown
2017-10-12 23:12:27 +13:00
parent f416bcbecf
commit 1a086470c6
3 changed files with 11 additions and 110 deletions

View File

@@ -168,9 +168,14 @@ load_display(display)
select_current_browser_index() select_current_browser_index()
def key(event): 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)) data_centre.update_next_bank_number(int(event.char))
# video_driver.next_player.reload_content() # video_driver.next_player.reload_content()
elif(event.char in ['\r']): elif(event.char in ['\r']):
@@ -216,6 +221,7 @@ frame.bind("<Up>", up_key)
frame.bind("<Down>", down_key) frame.bind("<Down>", down_key)
frame.bind("<BackSpace>", backspace_key) frame.bind("<BackSpace>", backspace_key)
frame.pack() frame.pack()
frame.focus_set() frame.focus_set()

View File

@@ -1,107 +1 @@
[ [{"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": ""}]
{
"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": ""
}
]

View File

@@ -93,7 +93,7 @@ class video_driver(object):
def get_info_for_video_display(self): def get_info_for_video_display(self):
if has_omx: if has_omx:
return self.current_player.bank_number, self.current_player.status, self.next_player.bank_number, \ 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: else:
return 0, 'test', 1, 'test', 0, 10 return 0, 'test', 1, 'test', 0, 10
@@ -146,6 +146,7 @@ class video_player(object):
self.start = next_context['start'] self.start = next_context['start']
self.end = next_context['end'] self.end = next_context['end']
self.video_name = next_context['name'] self.video_name = next_context['name']
self.bank_number = next_context['bank_number']
def reload_content(self): def reload_content(self):
self.status = 'RELOADING' self.status = 'RELOADING'