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

add new functions to play tag, track or album, and fix a couple of minor bugs #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

MonkeysAreEvil
Copy link

  • Add arguments to play either a track, tag, or album
  • Update bandcamp_parser.Album.tracks() to eliminate duplicate tracks returned by the parser
  • Update bandcamp_parser.Track.download_link() to raise an error when bandcamp does not provide a valid file.

- Add arguments to play either a track, tag, or album
- Update bandcamp_parser.Album.tracks() to eliminate duplicate tracks returned by the parser
- Update bandcamp_parser.Track.download_link() to raise an error when bandcamp does not provide a valid file.
Copy link
Owner

@strizhechenko strizhechenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, thanks for contribution!
Maybe its better to use argparse?
Doesn't download link automatically raise KeyError if there is no such key?
I will try to check code tomorrow?

@MonkeysAreEvil
Copy link
Author

Yeah fair enough about argparse just being lazy. I can push an update to that when I get a spare minute. And I'll check the download link too --- I haven't had any issues yet with that.

@MonkeysAreEvil
Copy link
Author

Ok so, busy week, but have a moment now to look at this again. I've updated to use argparse, so that's a little cleaner now.

The reason I added a check to download_link is because when Bandcamp fails to produce an mp3 the exception thrown is quite long and I doesn't tell you what's gone wrong. It's only happened a couple of times and I can't reproduce it at the moment, but I recall that the exception given suggests that there's an issue with soup not with the content Bandcamp returned. I think it's a little easier to understand what's gone wrong here by throwing a more specific error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants