Add SNI_SUPPORTED variable for https check

This commit is contained in:
tigranl 2016-12-06 17:10:35 +03:00
parent 73a7a4ff67
commit d065b33a81

View file

@ -23,7 +23,10 @@ from beets import config
from beets import plugins
from beets.dbcore import types
API_URL = 'http://ws.audioscrobbler.com/2.0/'
if ui.SNI_SUPPORTED >= (2, 7, 9):
API_URL = 'https://ws.audioscrobbler.com/2.0/'
else:
API_URL = 'https://ws.audioscrobbler.com/2.0/'
class LastImportPlugin(plugins.BeetsPlugin):