mirror of
https://github.com/beetbox/beets.git
synced 2026-01-15 20:51:38 +01:00
Add SNI_SUPPORTED variable for https check
This commit is contained in:
parent
d065b33a81
commit
5ae13764d8
1 changed files with 5 additions and 1 deletions
|
|
@ -25,6 +25,7 @@ from tempfile import NamedTemporaryFile
|
|||
from six.moves.urllib.parse import urlencode
|
||||
from beets import logging
|
||||
from beets import util
|
||||
from beets import ui
|
||||
import six
|
||||
|
||||
# Resizing methods
|
||||
|
|
@ -32,7 +33,10 @@ PIL = 1
|
|||
IMAGEMAGICK = 2
|
||||
WEBPROXY = 3
|
||||
|
||||
PROXY_URL = 'http://images.weserv.nl/'
|
||||
if ui.SNI_SUPPORTED >= (2, 7, 9):
|
||||
PROXY_URL = 'https://images.weserv.nl/'
|
||||
else:
|
||||
PROXY_URL = 'http://images.weserv.nl/'
|
||||
|
||||
log = logging.getLogger('beets')
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue