gonzopi

git clone https://git.tarina.org/gonzopi
Log | Files | Refs | README | LICENSE

commit 76275e61a107b2c262e09a80a7ce197239bcb7c2
parent a439833d9a48a39a3b9668acaf96271c01a595b0
Author: rbckman <rob@tarina.org>
Date:   Mon,  2 Dec 2024 10:18:44 +0000

view film thumbnail in select film, mount XFS fileystem, going to remove autousb mount

Diffstat:
Mgonzopi.py | 9++++++---
Msrv/gonzopiserver.py | 13++++++++++++-
2 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/gonzopi.py b/gonzopi.py @@ -1978,12 +1978,12 @@ def main(): lastmenu = menu[selected] if showgonzopictrl == False: menu = standardmenu - settings = storagedrives[dsk][0]+diskleft, filmname, str(scene) + '/' + str(scenes), str(shot) + '/' + str(shots), str(take) + '/' + str(takes), rectime, camerashutter, cameraiso, camerared, camerablue, str(round(camera.framerate)), str(quality), str(camera.brightness), str(camera.contrast), str(camera.saturation), effects[effectselected], str(flip), str(beeps), str(round(reclenght,2)), str(plughw), str(channels), str(miclevel), str(headphoneslevel), str(comp), '', cammode, '', serverstate, searchforcameras, wifistate, '', '', '', '', '', '', live + settings = storagedrives[dsk][0]+' '+diskleft, filmname, str(scene) + '/' + str(scenes), str(shot) + '/' + str(shots), str(take) + '/' + str(takes), rectime, camerashutter, cameraiso, camerared, camerablue, str(round(camera.framerate)), str(quality), str(camera.brightness), str(camera.contrast), str(camera.saturation), effects[effectselected], str(flip), str(beeps), str(round(reclenght,2)), str(plughw), str(channels), str(miclevel), str(headphoneslevel), str(comp), '', cammode, '', serverstate, searchforcameras, wifistate, '', '', '', '', '', '', live else: #gonzopictrlmenu = 'FILM:', 'SCENE:', 'SHOT:', 'TAKE:', '', 'SHUTTER:', 'ISO:', 'RED:', 'BLUE:', 'FPS:', 'Q:', 'BRIGHT:', 'CONT:', 'SAT:', 'FLIP:', 'BEEP:', 'LENGTH:', 'HW:', 'CH:', 'MIC:', 'PHONES:', 'COMP:', 'TIMELAPSE', 'MODE:', 'DSK:', 'SHUTDOWN', 'SRV:', 'SEARCH:', 'WIFI:', 'CAMERA:', 'Add CAMERA', 'New FILM', 'Sync FILM', 'Sync SCENE' menu = gonzopictrlmenu #settings = '',str(camselected),'','',rectime,'','','','','','','','','','' - settings = storagedrives[dsk][0]+diskleft, filmname, str(scene) + '/' + str(scenes), str(shot) + '/' + str(shots), str(take) + '/' + str(takes), rectime, camerashutter, cameraiso, camerared, camerablue, str(round(camera.framerate)), str(quality), str(camera.brightness), str(camera.contrast), str(camera.saturation), effects[effectselected], str(flip), str(beeps), str(reclenght), str(plughw), str(channels), str(miclevel), str(headphoneslevel), str(comp), '', cammode, '', serverstate, searchforcameras, wifistate, str(camselected), '', '', '', '', '', '' + settings = storagedrives[dsk][0]+' '+diskleft, filmname, str(scene) + '/' + str(scenes), str(shot) + '/' + str(shots), str(take) + '/' + str(takes), rectime, camerashutter, cameraiso, camerared, camerablue, str(round(camera.framerate)), str(quality), str(camera.brightness), str(camera.contrast), str(camera.saturation), effects[effectselected], str(flip), str(beeps), str(reclenght), str(plughw), str(channels), str(miclevel), str(headphoneslevel), str(comp), '', cammode, '', serverstate, searchforcameras, wifistate, str(camselected), '', '', '', '', '', '' #Rerender menu if picamera settings change #if settings != oldsettings or selected != oldselected: writemenu(menu,settings,selected,'',showmenu) @@ -4799,6 +4799,9 @@ def usbfilmfolder(dsk): buttontime = time.time() holdbutton = '' writemessage('Searching for usb storage device, middlebutton to cancel') + if os.path.exists('/dev/sda1') == True: + os.system('sudo mount /dev/sda1 /media/usb0') + #os.system('sudo umount -l /media/usb0') if dsk == 1: usbmount = 1 else: @@ -5357,7 +5360,7 @@ def startcamera(lens, fps): if camera_model == 'imx219': #table = read_table('lenses/' + lens) #camera.lens_shading_table = table - camera.framerate = 24.97 + camera.framerate = 24.96 elif camera_model == 'ov5647': #table = read_table('lenses/' + lens) camera.lens_shading_table = table diff --git a/srv/gonzopiserver.py b/srv/gonzopiserver.py @@ -428,6 +428,7 @@ class api: menudone='' p=0 film=None + selectfilm=False if menu != '': scene=1 shot=1 @@ -450,7 +451,14 @@ class api: # menudone=menudone+'<br>' #if p == 30: # menudone=menudone+'<br>' - if p == 4: + if p == 2 and i.rstrip('\n') == 'Up and down to select and load film': + selectfilm=True + if p == 3 and selectfilm==True: + try: + film=i.split(':')[1].rstrip('\n') + except: + film=None + if p == 4 and selectfilm == False: try: film=i.split(':')[1].rstrip('\n') except: @@ -478,6 +486,9 @@ class api: thumb = '' video = '' if film != None: + if selected == 0: + video = '/'+filmfolder + film +'/'+ film+'.mp4' + menudone+=menudone+'video' if selected == 4: video = '/'+filmfolder + film +'/'+ film+'.mp4' elif selected == 5: