|
|
@@ -8,6 +8,7 @@ import subprocess
|
|
|
import sys
|
|
|
import os
|
|
|
import pyinotify
|
|
|
+import audio_timings
|
|
|
|
|
|
from db import db,file_info
|
|
|
from constants import RAW_PATH
|
|
|
@@ -42,7 +43,9 @@ class OnWriteHandler(pyinotify.ProcessEvent):
|
|
|
if rc != 0:
|
|
|
print("Error?")
|
|
|
return
|
|
|
- d.insert_raw(file_info(out_fname))
|
|
|
+ info = file_info(out_fname)
|
|
|
+ info['timings'] = audio_timings.parse_file(out_fname)
|
|
|
+ d.insert_raw(info)
|
|
|
|
|
|
def process_IN_CLOSE_WRITE(self, event):
|
|
|
if not event.pathname.endswith(self.extension):
|