CC-4697: airtime-import script fails silently on FLAC files
- fixed
This commit is contained in:
parent
8d9fa1976e
commit
0870b1f018
1 changed files with 4 additions and 2 deletions
|
@ -8,6 +8,9 @@ import json
|
||||||
import shutil
|
import shutil
|
||||||
import commands
|
import commands
|
||||||
|
|
||||||
|
sys.path.append('/usr/lib/airtime/media-monitor/mm2/')
|
||||||
|
from media.monitor.pure import is_file_supported
|
||||||
|
|
||||||
# create logger
|
# create logger
|
||||||
logger = logging.getLogger()
|
logger = logging.getLogger()
|
||||||
|
|
||||||
|
@ -53,8 +56,7 @@ def copy_or_move_files_to(paths, dest, flag):
|
||||||
copy_or_move_files_to(sub_path, dest, flag)
|
copy_or_move_files_to(sub_path, dest, flag)
|
||||||
elif(os.path.isfile(path)):
|
elif(os.path.isfile(path)):
|
||||||
#copy file to dest
|
#copy file to dest
|
||||||
ext = os.path.splitext(path)[1]
|
if(is_file_supported(path)):
|
||||||
if( 'mp3' in ext or 'ogg' in ext ):
|
|
||||||
destfile = dest+os.path.basename(path)
|
destfile = dest+os.path.basename(path)
|
||||||
if(flag == 'copy'):
|
if(flag == 'copy'):
|
||||||
print "Copying %(src)s to %(dest)s..." % {'src':path, 'dest':destfile}
|
print "Copying %(src)s to %(dest)s..." % {'src':path, 'dest':destfile}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue