mirror of
https://github.com/beetbox/beets.git
synced 2026-01-03 14:32:55 +01:00
Move import inside the function
This commit is contained in:
parent
59d5d23bb3
commit
2d942ce722
1 changed files with 1 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue