fetchart: add docstring to helper function

_is_valid_image_candidate() now has three different return values.
These are documented here.
This commit is contained in:
reiv 2015-11-02 03:02:11 +01:00
parent 9182fd8f04
commit db08896d8c

View file

@ -509,6 +509,13 @@ class FetchArtPlugin(plugins.BeetsPlugin, RequestMixin):
return None
def _is_valid_image_candidate(self, candidate):
"""Determine whether the given candidate artwork is valid based on
its dimensions (width and ratio).
Return `CANDIDATE_BAD` if the file is unusable.
Return `CANDIDATE_EXACT` if the file is usable as-is.
Return `CANDIDATE_DOWNSCALE` if the file must be resized.
"""
if not candidate:
return CANDIDATE_BAD