sya

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

commit d7eea673c19fbc83822d599f9578896c54e951da
parent d04a607903cadeb3182335afc65583d5c6b5af62
Author: gearsix <gearsix@tuta.io>
Date:   Wed,  7 Dec 2022 00:23:00 +0000

bugfix: weird characters caused the utf-8 encoding to break

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

diff --git a/sya-pyqt.py b/sya-pyqt.py @@ -69,7 +69,7 @@ def generate_tracklist(url, tracklist): with open(fd, 'w') as f: f.write(url) f.write('\n') - f.writelines(tracklist) + f.writelines(t.encode('utf-8').decode('ascii', 'ignore') for t in tracklist) return fpath @@ -95,6 +95,8 @@ class SyaGuiLogStream(qtcore.QObject): class SyaGuiOptions(qtwidg.QWidget): def __init__(self, init_values): + super().__init__() + url = '' tracklist = '' output = '' @@ -103,7 +105,6 @@ class SyaGuiOptions(qtwidg.QWidget): if init_values.output == '' and init_values.tracklist != '': output = os.path.join(os.getcwd(), os.path.splitext(os.path.basename(init_values.tracklist))[0]) - super().__init__() self.labels = { 'url': 'URL:', 'tracklist': 'Tracklist:',