From db08896d8cff2a0333f7cc21395d5570b8532f26 Mon Sep 17 00:00:00 2001 From: reiv Date: Mon, 2 Nov 2015 03:02:11 +0100 Subject: [PATCH] fetchart: add docstring to helper function _is_valid_image_candidate() now has three different return values. These are documented here. --- beetsplug/fetchart.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/beetsplug/fetchart.py b/beetsplug/fetchart.py index 5eae63278..9da781e6c 100644 --- a/beetsplug/fetchart.py +++ b/beetsplug/fetchart.py @@ -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