diff --git a/addon.py b/addon.py
index 8c5a74e..fd6961c 100644
--- a/addon.py
+++ b/addon.py
@@ -30,6 +30,7 @@ class Plugin(object):
self.url = addon.getSetting("subsonic_url")
self.username = addon.getSetting("username")
self.password = addon.getSetting("password")
+ self.apiversion = addon.getSetting("apiversion")
self.albums_per_page = int(addon.getSetting("albums_per_page"))
self.tracks_per_page = int(addon.getSetting("tracks_per_page"))
@@ -39,7 +40,7 @@ class Plugin(object):
# Create connection
self.connection = libsonic_extra.SubsonicClient(
- self.url, self.username, self.password)
+ self.url, self.username, self.password, self.apiversion)
def build_url(self, query):
"""
diff --git a/lib/libsonic_extra/__init__.py b/lib/libsonic_extra/__init__.py
index 9a5e1ee..e001e2c 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):
+ def __init__(self, url, username, password, apiversion):
"""
Construct a new SubsonicClient.
@@ -63,7 +63,7 @@ class SubsonicClient(libsonic.Connection):
# Invoke original constructor
super(SubsonicClient, self).__init__(
- host, username, password, port=port)
+ host, username, password, port=port, apiVersion=apiversion)
def getIndexes(self, *args, **kwargs):
"""
diff --git a/resources/settings.xml b/resources/settings.xml
index 011955f..df7c41c 100644
--- a/resources/settings.xml
+++ b/resources/settings.xml
@@ -4,6 +4,7 @@
+