Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bandcamp support #3252

Merged
merged 15 commits into from
Nov 26, 2023
Prev Previous commit
Next Next commit
Use more sane loglevels
  • Loading branch information
b10m committed Jul 16, 2020
commit 532295150f0259b17fa3e4995334b7652fb634d7
10 changes: 5 additions & 5 deletions headphones/bandcamp.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def search(album, albumlength=None, page=1, resultlist=None):
"page": page,
"q": cleanalbum,
}
logger.debug("Looking up https://bandcamp.com/search with {}".format(
logger.info("Looking up https://bandcamp.com/search with {}".format(
params))
content = request.request_content(
url='https://bandcamp.com/search',
Expand All @@ -60,9 +60,9 @@ def search(album, albumlength=None, page=1, resultlist=None):
cleanartist_found = helpers.latinToAscii(data['artist'])
cleanalbum_found = helpers.latinToAscii(data['album'])

logger.info(u"{} - {}".format(data['album'], cleanalbum_found))
logger.debug(u"{} - {}".format(data['album'], cleanalbum_found))

logger.info("Comparing {} to {}".format(
logger.debuginfo("Comparing {} to {}".format(
cleanalbum, cleanalbum_found))
if (cleanartist.lower() == cleanartist_found.lower() and
cleanalbum.lower() == cleanalbum_found.lower()):
Expand All @@ -74,7 +74,7 @@ def search(album, albumlength=None, page=1, resultlist=None):

if(soup.find('a', class_='next')):
page += 1
logger.info("Calling next page ({})".format(page))
logger.debug("Calling next page ({})".format(page))
search(album, albumlength=albumlength,
page=page, resultlist=resultlist)

Expand Down Expand Up @@ -128,7 +128,7 @@ def download(album, bestqual):
})
f.save()
except UnreadableFileError as ex:
logger.info("MediaFile couldn't parse: %s (%s)",
logger.warn("MediaFile couldn't parse: %s (%s)",
fullname,
str(ex))

Expand Down