sya

split youtube audio tracks, with an optional pyqt gui
git clone git://src.gearsix.net/sya
Log | Files | Refs | Atom | README

commit 1563563c31b376e9877c82a963ffbccc6caacded
parent afa6062ebefba8f142f11a8f7edd46518bb70cdf
Author: gearsix <gearsix@tuta.io>
Date:   Thu,  9 Jun 2022 10:11:37 +0100

made track titles path-safe, track numbering starts from 01 (not 00).

Diffstat:
Msya.py | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sya.py b/sya.py @@ -89,6 +89,7 @@ def parse_tracks(tracklist): timestamp = l.strip('[()]') sline.remove(l) title = ' '.join(sline).strip(' ') + title = title.replace('/', ',').replace('\\', ',').replace('"', ' ').replace('\'', ' ') if Timestamp.match(timestamp) == None: log('line {}, missing timestamp: "{}"'.format(lcount, line)) timestamp = None @@ -115,7 +116,7 @@ def split_tracks(ffmpeg, audio_fpath, tracks, format='mp3', outpath='out'): return for i, t in enumerate(tracks): - outfile = '{}/{} - {}.{}'.format(outpath, str(i).zfill(2), t.title.strip(' - '), format) + outfile = '{}/{} - {}.{}'.format(outpath, str(i+1).zfill(2), t.title.strip(' - '), format) end = length if i < len(tracks)-1: end = tracks[i+1].timestamp