From cd979d30781b90293ee3dcd8dcabeb2156f3ce1c Mon Sep 17 00:00:00 2001 From: George Pchelkin Date: Fri, 9 Feb 2018 17:49:12 +0300 Subject: [PATCH 1/2] extract-artist dashes, minus and hyphen + spaces (#250) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit extract artist only when found one of: - − – — ― surronded by spaces (to avoid error behaviour on artists or tracks with hyphen in title) --- scdl/scdl.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scdl/scdl.py b/scdl/scdl.py index 00fad0f..63ff2f0 100755 --- a/scdl/scdl.py +++ b/scdl/scdl.py @@ -633,10 +633,12 @@ def set_metadata(track, filename, album=None): track['artist'] = user['username'] if arguments['--extract-artist']: - if '-' in track['title']: - artist_title = track['title'].split('-') - track['artist'] = artist_title[0].strip() - track['title'] = artist_title[1].strip() + for dash in [' - ', ' − ', ' – ', ' — ', ' ― ']: + if dash in track['title']: + artist_title = track['title'].split(dash) + track['artist'] = artist_title[0].strip() + track['title'] = artist_title[1].strip() + break audio = mutagen.File(filename) audio['TIT2'] = mutagen.id3.TIT2(encoding=3, text=track['title']) From 2a87a85f39d22a881f3cc205b6d35ec251fe8fba Mon Sep 17 00:00:00 2001 From: glicOne Date: Tue, 20 Mar 2018 10:10:34 +0200 Subject: [PATCH 2/2] Installing instruction for Gentoo users (#253) --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index df613e7..26d86de 100755 --- a/README.md +++ b/README.md @@ -20,6 +20,15 @@ or git clone https://github.com/flyingrub/scdl.git && cd scdl python3 setup.py install ``` +or + +### Gentoo + +``` +layman -fa glicOne +sudo emerge -av net-misc/scdl +``` + (Optional) Setup your path and your auth_token in `$HOME/.config/scdl/scdl.cfg`