AUDIO_INPUT directory configurable
This commit is contained in:
parent
ae9d686aa1
commit
3502a72274
2 changed files with 9 additions and 2 deletions
|
@ -2,5 +2,6 @@ OUTPUT_DIR='output'
|
|||
HOST='localhost'
|
||||
PORT='8000'
|
||||
DEBUG=True
|
||||
DB_URI='sqlite://techrec.db'
|
||||
DB_URI='sqlite:///techrec.db'
|
||||
AUDIO_OUTPUT='output/'
|
||||
AUDIO_INPUT='rec/'
|
||||
|
|
|
@ -1,13 +1,19 @@
|
|||
from datetime import datetime, timedelta
|
||||
import os.path
|
||||
from subprocess import Popen
|
||||
|
||||
from config_manager import get_config
|
||||
|
||||
|
||||
def get_timefile_exact(time):
|
||||
'''
|
||||
time is of type `datetime`; it is not "rounded" to match the real file;
|
||||
that work is done in get_timefile(time)
|
||||
'''
|
||||
return time.strftime('%Y-%m/%d/rec-%Y-%m-%d-%H-%M-%S-ror.mp3')
|
||||
return os.path.join(
|
||||
get_config()['AUDIO_INPUT'],
|
||||
time.strftime('%Y-%m/%d/rec-%Y-%m-%d-%H-%M-%S-ror.mp3')
|
||||
)
|
||||
|
||||
|
||||
def round_timefile(exact):
|
||||
|
|
Loading…
Reference in a new issue