Update code to take into consideration files that may not have HTTP, additionally, update gitignore.

master
Iheanyi Ekechukwu 2015-12-11 14:19:02 -06:00
parent c12a8a35dc
commit 54a6524cc3
2 changed files with 7 additions and 1 deletions

1
.gitignore vendored
View File

@ -19,6 +19,7 @@ lib
lib64
files/
*.mp3
**/*.mp3
# Installer logs
pip-log.txt

View File

@ -23,6 +23,7 @@ class BandcampDownloader():
self.overwrite = overwrite
def start(self, album):
print "Starting download process."
self.download_album(album)
def template_to_path(self, track):
@ -65,7 +66,11 @@ class BandcampDownloader():
continue
try:
tmp_file = wgetter.download(track['url'], outdir=dirname)
track_url = track['url']
# Check and see if HTTP is in the track_url
if 'http' not in track_url:
track_url = 'http:%s' % track_url
tmp_file = wgetter.download(track_url, outdir=dirname)
os.rename(tmp_file, filename)
self.write_id3_tags(filename, track_meta)
except Exception as e: