From 2d942ce722a0c510f5b99f0ba84b8a433bea76dd Mon Sep 17 00:00:00 2001 From: Alok Saboo Date: Sun, 19 Mar 2023 09:15:38 -0400 Subject: [PATCH] Move import inside the function --- beetsplug/embedart.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beetsplug/embedart.py b/beetsplug/embedart.py index 10f179afc..6f46efb87 100644 --- a/beetsplug/embedart.py +++ b/beetsplug/embedart.py @@ -18,7 +18,6 @@ import os.path from io import BytesIO import requests -from PIL import Image from beets import art, config, ui from beets.plugins import BeetsPlugin @@ -113,6 +112,7 @@ class EmbedCoverArtPlugin(BeetsPlugin): None, compare_threshold, ifempty, quality=quality) elif opts.url: + from PIL import Image response = requests.get(opts.url) img = Image.open(BytesIO(response.content)) if img.format: