forked from tobast/sonnetteweb
Add actual ringing
This commit is contained in:
parent
88e42032df
commit
c2d16b7700
1 changed files with 6 additions and 1 deletions
|
@ -4,6 +4,7 @@ Sonnez via le réseau local. C'est cool, hein ?
|
|||
"""
|
||||
|
||||
from datetime import datetime, timedelta
|
||||
import subprocess
|
||||
from flask import Flask, render_template, request
|
||||
|
||||
app = Flask('sonnetteweb')
|
||||
|
@ -26,7 +27,11 @@ class Ringer:
|
|||
return False
|
||||
self.last_rung = datetime.now()
|
||||
|
||||
print('dring')
|
||||
print('Dring!')
|
||||
|
||||
subprocess.run(['bash',
|
||||
'-c',
|
||||
'aplay ringtone.wav &'])
|
||||
return True
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue