commit ee9265679f5ce65f0f2cef5dcc5ffba75f2f063b
parent e3e1e1ca2388bae8256d5b72f77679ba996a7160
Author: Robin Bäckman <robinbackman@gmail.com>
Date: Fri, 29 Jul 2016 16:29:51 +0300
added debian version checking for amixer, different commands in wheezy and jessie
Diffstat:
1 file changed, 23 insertions(+), 6 deletions(-)
diff --git a/tarina.py b/tarina.py
@@ -936,6 +936,9 @@ def main():
tarinaversion = f.readline()
tarinavername = f.readline()
+ f = open('/etc/debian_version')
+ debianversion = f.readlines()[0][0]
+
#COUNT DISKSPACE
disk = os.statvfs(filmfolder)
diskleft = str(disk.f_bavail * disk.f_frsize / 1024 / 1024 / 1024) + 'Gb'
@@ -1239,11 +1242,21 @@ def main():
elif selected == 11:
if miclevel < 100:
miclevel = miclevel + 2
- os.system('amixer -c 0 set Mic Capture ' + str(miclevel) + '%')
+ #Wheezy
+ if debianversion == '7':
+ os.system('amixer -c 0 set Mic Capture ' + str(miclevel) + '%')
+ #Jessie
+ if debianversion == '8':
+ os.system('amixer sset Mic ' + str(miclevel) + '%')
elif selected == 12:
if headphoneslevel < 100:
headphoneslevel = headphoneslevel + 2
- os.system('amixer -c 0 set Mic Playback ' + str(headphoneslevel) + '%')
+ #Wheezy
+ if debianversion == '7':
+ os.system('amixer -c 0 set Mic Playback ' + str(headphoneslevel) + '%')
+ #Jessie
+ if debianversion == '8':
+ os.system('amixer sset Playback ' + str(headphoneslevel) + '%')
elif selected == 15:
scene, shot, take = browse2(filmname, filmfolder, scene, shot, take, 0, 1)
removeimage(camera, overlay)
@@ -1316,16 +1329,20 @@ def main():
if miclevel > 0:
miclevel = miclevel - 2
#Wheezy
- #os.system('amixer -c 0 set Mic Capture ' + str(miclevel) + '%')
+ if debianversion == '7':
+ os.system('amixer -c 0 set Mic Capture ' + str(miclevel) + '%')
#Jessie
- os.system('amixer sset Mic ' + str(miclevel) + '%')
+ if debianversion == 's':
+ os.system('amixer sset Mic ' + str(miclevel) + '%')
elif selected == 12:
if headphoneslevel > 0:
headphoneslevel = headphoneslevel - 2
#Wheezy
- #os.system('amixer -c 0 set Mic Playback ' + str(headphoneslevel) + '%')
+ if debianversion == '7':
+ os.system('amixer -c 0 set Mic Playback ' + str(headphoneslevel) + '%')
#Jessie
- os.system('amixer sset Playback ' + str(headphoneslevel) + '%')
+ if debianversion == 's':
+ os.system('amixer sset Playback ' + str(headphoneslevel) + '%')
elif selected == 15:
scene, shot, take = browse2(filmname, filmfolder, scene, shot, take, 0, -1)
removeimage(camera, overlay)