From 47d0fcbe775d2942e87367b9e1f06e9a1bd29344 Mon Sep 17 00:00:00 2001 From: gordielachance Date: Sat, 1 Oct 2016 00:33:03 +0200 Subject: [PATCH] add insecure setting cloned from https://github.com/lrusak/plugin.audio.subsonic/commit/5c5040a7d92a8e88c 8e371140a0fa2c6e606d0d5 --- addon.py | 3 ++- lib/libsonic_extra/__init__.py | 4 ++-- resources/settings.xml | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/addon.py b/addon.py index fd6961c..78cc6d8 100644 --- a/addon.py +++ b/addon.py @@ -31,6 +31,7 @@ class Plugin(object): self.username = addon.getSetting("username") self.password = addon.getSetting("password") self.apiversion = addon.getSetting("apiversion") + self.insecure = addon.getSetting("insecure") == "true" self.albums_per_page = int(addon.getSetting("albums_per_page")) self.tracks_per_page = int(addon.getSetting("tracks_per_page")) @@ -40,7 +41,7 @@ class Plugin(object): # Create connection self.connection = libsonic_extra.SubsonicClient( - self.url, self.username, self.password, self.apiversion) + self.url, self.username, self.password, self.apiversion, self.insecure) def build_url(self, query): """ diff --git a/lib/libsonic_extra/__init__.py b/lib/libsonic_extra/__init__.py index e001e2c..6d97343 100644 --- a/lib/libsonic_extra/__init__.py +++ b/lib/libsonic_extra/__init__.py @@ -33,7 +33,7 @@ class SubsonicClient(libsonic.Connection): - Add conventient `walk_*' methods to iterate over the API responses. """ - def __init__(self, url, username, password, apiversion): + def __init__(self, url, username, password, apiversion, insecure): """ Construct a new SubsonicClient. @@ -63,7 +63,7 @@ class SubsonicClient(libsonic.Connection): # Invoke original constructor super(SubsonicClient, self).__init__( - host, username, password, port=port, apiVersion=apiversion) + host, username, password, port=port, apiVersion=apiversion, insecure=insecure) def getIndexes(self, *args, **kwargs): """ diff --git a/resources/settings.xml b/resources/settings.xml index df7c41c..ef258a9 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -5,6 +5,7 @@ +