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 support for local cover art #417

Merged
merged 5 commits into from
Jul 12, 2015

Conversation

zas
Copy link
Collaborator

@zas zas commented Jul 8, 2015

It adds a cover art provider, which, when enabled, looks for files like cover.jpg, etc.. in local directory (where sound files are) and use image files found as cover art.

Inspired by http://forums.musicbrainz.org/viewtopic.php?id=2859

Solves:
http://tickets.musicbrainz.org/browse/PICARD-137

Related:
http://tickets.musicbrainz.org/browse/PICARD-257
http://tickets.musicbrainz.org/browse/PICARD-187

capture du 2015-07-03 18 49 29
capture du 2015-07-03 18 49 36

return
self.next_in_queue()
return
except AttributeError:
Copy link
Member

Choose a reason for hiding this comment

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

Is this for handling the missing filepath attribute on images that don't have it? If so, that seems overly broad and should be replaced with isinstance or hasattr calls.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I went for hasattr() in a3351d5

zas added 2 commits July 9, 2015 12:16
Suggested by Mineo
- try/except is more pythonic, but less readable, even if narrowed
- hasattr() is pythonic enough, and more readable
- isinstance() isn't pythonic enough (and forces to import the class)
zas added a commit that referenced this pull request Jul 12, 2015
@zas zas merged commit a14d7f0 into metabrainz:master Jul 12, 2015
@zas zas deleted the add_local_cover_art_support_3 branch July 12, 2015 09:09
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