From a28525f14473cfb652604e1efe04a33b0d2b8585 Mon Sep 17 00:00:00 2001 From: Kepoor Hampond Date: Thu, 26 Jan 2017 20:16:30 -0800 Subject: [PATCH] Over looked crucial detail while making program. --- irs/config.py | 4 +++- irs/manager.py | 3 ++- setup.py | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/irs/config.py b/irs/config.py index acf359a..2bd3ba9 100644 --- a/irs/config.py +++ b/irs/config.py @@ -1,3 +1,5 @@ +from os.path import expanduser + CONFIG = dict( # To autostart rhythmbox with a new song: @@ -12,7 +14,7 @@ CONFIG = dict( client_secret = '', # For a custom directory. Note that `~` will not work as a shortcut. - directory = '', + directory = str(expanduser("~")) + "/Music", # If you want numbered file names numbered_file_names = True, diff --git a/irs/manager.py b/irs/manager.py index c339498..7a43960 100644 --- a/irs/manager.py +++ b/irs/manager.py @@ -242,7 +242,8 @@ class Manager: if CONFIG["download_file_names"]: filename = track + strip_special_chars((BeautifulSoup(\ - urlopen("http://www.youtube.com/watch?v=" + audio_code), 'html.parser')).title.string.lower()) + ".mp3" + urlopen("http://www.youtube.com/watch?v=" + audio_code), 'html.parser'))\ + .title.string.lower()).strip("youtube") + ".mp3" ydl_opts = { 'format': 'bestaudio/best', diff --git a/setup.py b/setup.py index f43b12f..c94fca1 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup setup( name='irs', - version='4.8.22', + version='4.8.23', description='A music downloader that just gets metadata.', url='https://github.com/kepoorhampond/irs', author='Kepoor Hampond',