mirror of
https://github.com/beetbox/beets.git
synced 2026-01-19 14:45:17 +01:00
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:
parent
9182fd8f04
commit
db08896d8c
1 changed files with 7 additions and 0 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue