commit f4b8042e724520310feebf742bbe46b611fede7f
parent 3cc2a1687441e93720ef052a0d7d13d3678a9e42
Author: gearsix <gearsix@tuta.io>
Date: Fri, 28 Oct 2022 15:19:25 +0100
bugfix to file length parsing; --keep isn't true by default anymore
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sya.py b/sya.py
@@ -41,7 +41,7 @@ def parse_args():
parser.add_argument('--ffmpeg', metavar='PATH', type=str, nargs='?',
default='ffmpeg', dest='ffmpeg',
help='path of the "ffmpeg" binary to use')
- parser.add_argument('-k', '--keep', action='store_true',
+ parser.add_argument('-k', '--keep', action='store_false',
help='keep any files removed during processing (full video/audio file)')
return parser.parse_args()
@@ -112,7 +112,7 @@ def split_tracks(ffmpeg, audio_fpath, tracks, format='mp3', outpath='out'):
# some nasty string manip. to extract length (printed to stderr)
try:
length = str(ret).split('\\r')
- length = length[len(length)-2].split(' ')[1].split('=')[1][:-3]
+ length = length[len(length)-1].split(' ')[1].split('=')[1][:-3]
except:
log('Failed to find track length, {}'.format(length))
return