tarina

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

commit 99022d31619e00316ee870a8c17ce35c0e970948
parent 22da6092065d351c2ad5445b08de80d08f0f2084
Author: rob <rob@tarina.org>
Date:   Sun, 19 Mar 2023 09:47:00 +0000

again systemd things

Diffstat:
Minstall.sh | 9++++++++-
Mtarina.py | 20++++++++++++++++++--
2 files changed, 26 insertions(+), 3 deletions(-)

diff --git a/install.sh b/install.sh @@ -215,7 +215,7 @@ Conflicts=getty@tty1.service [Service] Type=simple RemainAfterExit=yes -ExecStart=/usr/bin/nohup /usr/bin/python3 /home/pi/tarina/tarina.py default +ExecStart=/usr/bin/python3 /home/pi/tarina/tarina.py default User=pi Restart=on-failure StandardInput=tty-force @@ -232,6 +232,13 @@ CPUSchedulingPriority=99 WantedBy=local-fs.target EOF +#dont kill process if user log out or in + +cat <<'EOF' >> /etc/systemd/logind.conf +KillUserProcesses=no +EOF + + #thanx systemd for making me search for years to make this all workd like a normal programd. loginctl enable-linger loginctl enable-linger pi diff --git a/tarina.py b/tarina.py @@ -84,7 +84,10 @@ for adapter in adapters: if '::' not in ip.ip[0] and '127.0.0.1' != ip.ip: print(ip.ip) networks.append(ip.ip) -network=networks[0] +if networks != []: + network=networks[0] +else: + network='' #MAIN def main(): @@ -1116,6 +1119,19 @@ def main(): #print('saving settings') savesettings(settings_to_save, filmname, filmfolder) pausetime = time.time() + #NETWORKS + networks=[] + adapters = ifaddr.get_adapters() + for adapter in adapters: + print("IPs of network adapter " + adapter.nice_name) + for ip in adapter.ips: + if '::' not in ip.ip[0] and '127.0.0.1' != ip.ip: + print(ip.ip) + networks.append(ip.ip) + if networks != []: + network=networks[0] + else: + network='not connected' vumetermessage('filming with '+camera_model +' ip:'+ network + ' ') print(term.yellow+'filming with '+camera_model +' ip:'+ network + ' ') #writemessage(pressed) @@ -3513,7 +3529,7 @@ def startcamera(lens, fps): if camera_revision == 'rev.D': camera.framerate = 23.15 elif camera_model == 'imx477': - camera.framerate = 24.985 + camera.framerate = 24.975 else: camera.framerate = fps camera.crop = (0, 0, 1.0, 1.0)