tarina

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

commit 74354728b72a00a0c758fe46c4934d1ff524eeb1
parent 02fd55c91cfff184b19e5dd1ceb01695cdc08219
Author: rob <rob@tarina.org>
Date:   Fri, 31 May 2019 13:55:08 +0300

trying modding kernel page caching to get it stop dropping frames also new film fix

Diffstat:
Aextras/sdcardhack.sh | 6++++++
Minstall.sh | 28++++++++++++++++------------
Mtarina.py | 11+++++++----
3 files changed, 29 insertions(+), 16 deletions(-)

diff --git a/extras/sdcardhack.sh b/extras/sdcardhack.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +echo 3 >/proc/sys/vm/dirty_background_ratio +echo 50 >/proc/sys/vm/dirty_ratio +echo 300 >/proc/sys/vm/dirty_writeback_centisecs +echo 300 >/proc/sys/vm/dirty_expire_centisecs diff --git a/install.sh b/install.sh @@ -161,17 +161,26 @@ systemctl reload apache2 echo 'Dont do sync while copying to usb drives, does increase speed alöt!' sed -i '/MOUNTOPTIONS=/c\MOUNTOPTIONS="noexec,nodev,noatime,nodiratime"' /etc/usbmount/usbmount.conf -while true; do - read -p "Do you wish to add capabilities to backup to all different harddrives like ntfs and vfat systems? [y]es or [n]o" yn - case $yn in - [Yy]* ) echo "Adding harddrive tools..." +echo "Adding harddrive tools..." +cat <<'EOF' +All this hard work to figure out how to keep NTFS mounted was done by F. Untermoser +https://raspberrypi.stackexchange.com/questions/41959/automount-various-usb-stick-file-systems-on-jessie-lite +Thanks alot! + +while we are at it :) +To all the amazing FOSS people out there big big props and + _____ ______ _____ _____ ______ _____ _______ _ + | __ \| ____|/ ____| __ \| ____/ ____|__ __| | + | |__) | |__ | (___ | |__) | |__ | | | | | | + | _ /| __| \___ \| ___/| __|| | | | | | + | | \ \| |____ ____) | | | |___| |____ | | |_| + |_| \_\______|_____/|_| |______\_____| |_| (_) + +EOF apt-get -y install ntfs-3g exfat-fuse sed -i -e 's/MountFlags=slave/MountFlags=shared/g' /lib/systemd/system/systemd-udevd.service sed -i '/FS_MOUNTOPTIONS=/c\FS_MOUNTOPTIONS="-fstype=ntfs-3g,nls=utf8,umask=007,gid=46 -fstype=fuseblk,nls=utf8,umask=007,gid=46 -fstype=vfat,gid=1000,uid=1000,umask=007"' /etc/usbmount/usbmount.conf sed -i '/FILESYSTEMS=/c\FILESYSTEMS="vfat ext2 ext3 ext4 hfsplus ntfs fuseblk vfat"' /etc/usbmount/usbmount.conf -echo "All this hard work to figure out how to keep NTFS mounted was done by F. Untermoser" -echo "Found it here https://raspberrypi.stackexchange.com/questions/41959/automount-various-usb-stick-file-systems-on-jessie-lite" -echo "Big props! thanks alot!" cat <<'EOF' > /etc/udev/rules.d/usbmount.rules KERNEL=="sd*", DRIVERS=="sbp2", ACTION=="add", PROGRAM="/bin/systemd-escape -p --template=usbmount@.service $env{DEVNAME}", ENV{SYSTEMD_WANTS}+="%c" @@ -193,11 +202,6 @@ Environment=DEVNAME=%I ExecStart=/usr/share/usbmount/usbmount add RemainAfterExit=yes EOF - break;; - [Nn]* ) echo "Nope, okay! who wants those shitty systems anyways!";break;; - * ) echo "Please answer yes or no.";; - esac -done while true; do read -p "Do you wish to add rbckmans special hacking tools and configurations [y]es or [n]o?" yn diff --git a/tarina.py b/tarina.py @@ -387,7 +387,7 @@ def nameyourfilm(filmfolder, filmname, abc): buttontime = time.time() holdbutton = '' abcx = 0 - thefuck = '' + thefuck = 'Up, Down (select characters) Right (next). Middle (done)' cursor = '_' blinking = True pausetime = time.time() @@ -407,7 +407,7 @@ def nameyourfilm(filmfolder, filmname, abc): abcx = abcx - 1 cursor = abc[abcx] elif pressed == 'right': - if len(filmname) < 25: + if len(filmname) < 30: filmname = filmname + abc[abcx] cursor = abc[abcx] else: @@ -416,9 +416,10 @@ def nameyourfilm(filmfolder, filmname, abc): if len(filmname) > 0: filmname = filmname[:-1] cursor = abc[abcx] - thefuck = '' elif pressed == 'middle' or event == 10: if len(filmname) > 0: + if cursor != '_': + filmname = filmname + abc[abcx] try: if filmname in getfilms(filmfolder)[0]: thefuck = 'this filmname is already taken! chose another name!' @@ -441,7 +442,7 @@ def nameyourfilm(filmfolder, filmname, abc): cursor = ' ' blinking = not blinking pausetime = time.time() - time.sleep(0.02) + time.sleep(0.08) #------------Timelapse-------------------------- @@ -1376,6 +1377,8 @@ def main(): #Turn off hdmi to save power os.system('tvservice -o') + #Kernel page cache optimization for sd card + os.system('sudo ' + tarinafolder + '/extras/sdcardhack.sh') #COUNT DISKSPACE disk = os.statvfs(filmfolder)