commit
10bb432a14
|
@ -1,7 +1,9 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## v2.0.X
|
## v2.0.6
|
||||||
Released XXX
|
Released 14 January 2017
|
||||||
|
* Upgrade to simpleplugin 2.1.0
|
||||||
|
* Browse/Library menus (file structure vs ID3 tags)
|
||||||
* Added multilanguage support
|
* Added multilanguage support
|
||||||
|
|
||||||
## v2.0.5
|
## v2.0.5
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<addon id="plugin.audio.subsonic" name="Subsonic" version="2.0.5" provider-name="BasilFX,grosbouff">
|
<addon id="plugin.audio.subsonic" name="Subsonic" version="2.0.6" provider-name="BasilFX,grosbouff">
|
||||||
<requires>
|
<requires>
|
||||||
<import addon="xbmc.python" version="2.14.0"/>
|
<import addon="xbmc.python" version="2.14.0"/>
|
||||||
<import addon="script.module.dateutil" version="2.4.2"/>
|
<import addon="script.module.dateutil" version="2.4.2"/>
|
||||||
|
|
|
@ -140,6 +140,7 @@ class SubsonicClient(libsonic.Connection):
|
||||||
|
|
||||||
def getArtists(self, *args, **kwargs):
|
def getArtists(self, *args, **kwargs):
|
||||||
"""
|
"""
|
||||||
|
(ID3 tags)
|
||||||
Improve the getArtists method. Ensures IDs are integers.
|
Improve the getArtists method. Ensures IDs are integers.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@ -162,6 +163,7 @@ class SubsonicClient(libsonic.Connection):
|
||||||
|
|
||||||
def getArtist(self, *args, **kwargs):
|
def getArtist(self, *args, **kwargs):
|
||||||
"""
|
"""
|
||||||
|
(ID3 tags)
|
||||||
Improve the getArtist method. Ensures IDs are integers.
|
Improve the getArtist method. Ensures IDs are integers.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@ -209,6 +211,7 @@ class SubsonicClient(libsonic.Connection):
|
||||||
|
|
||||||
def getAlbum(self, *args, **kwargs):
|
def getAlbum(self, *args, **kwargs):
|
||||||
"""
|
"""
|
||||||
|
(ID3 tags)
|
||||||
Improve the getAlbum method. Ensures the IDs are real integers.
|
Improve the getAlbum method. Ensures the IDs are real integers.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@ -296,24 +299,17 @@ class SubsonicClient(libsonic.Connection):
|
||||||
else:
|
else:
|
||||||
return super(SubsonicClient, self)._doBinReq(*args, **kwargs)
|
return super(SubsonicClient, self)._doBinReq(*args, **kwargs)
|
||||||
|
|
||||||
def walk_index(self):
|
def walk_index(self, folder_id=None):
|
||||||
"""
|
"""
|
||||||
Request Subsonic's index and iterate each item.
|
Request Subsonic's index and iterate each item.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
response = self.getIndexes()
|
response = self.getIndexes(folder_id)
|
||||||
|
|
||||||
for index in response["indexes"]["index"]:
|
for index in response["indexes"]["index"]:
|
||||||
for index in index["artist"]:
|
for artist in index["artist"]:
|
||||||
for item in self.walk_directory(index["id"]):
|
yield artist
|
||||||
yield item
|
|
||||||
|
|
||||||
for child in response["indexes"]["child"]:
|
|
||||||
if child.get("isDir"):
|
|
||||||
for child in self.walk_directory(child["id"]):
|
|
||||||
yield child
|
|
||||||
else:
|
|
||||||
yield child
|
|
||||||
|
|
||||||
def walk_playlists(self):
|
def walk_playlists(self):
|
||||||
"""
|
"""
|
||||||
|
@ -335,6 +331,12 @@ class SubsonicClient(libsonic.Connection):
|
||||||
for child in response["playlist"]["entry"]:
|
for child in response["playlist"]["entry"]:
|
||||||
yield child
|
yield child
|
||||||
|
|
||||||
|
def walk_folders(self):
|
||||||
|
response = self.getMusicFolders()
|
||||||
|
|
||||||
|
for child in response["musicFolders"]["musicFolder"]:
|
||||||
|
yield child
|
||||||
|
|
||||||
def walk_directory(self, directory_id):
|
def walk_directory(self, directory_id):
|
||||||
"""
|
"""
|
||||||
Request a Subsonic music directory and iterate over each item.
|
Request a Subsonic music directory and iterate over each item.
|
||||||
|
@ -361,6 +363,7 @@ class SubsonicClient(libsonic.Connection):
|
||||||
|
|
||||||
def walk_artists(self):
|
def walk_artists(self):
|
||||||
"""
|
"""
|
||||||
|
(ID3 tags)
|
||||||
Request all artists and iterate over each item.
|
Request all artists and iterate over each item.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@ -372,6 +375,7 @@ class SubsonicClient(libsonic.Connection):
|
||||||
|
|
||||||
def walk_genres(self):
|
def walk_genres(self):
|
||||||
"""
|
"""
|
||||||
|
(ID3 tags)
|
||||||
Request all genres and iterate over each item.
|
Request all genres and iterate over each item.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@ -382,6 +386,7 @@ class SubsonicClient(libsonic.Connection):
|
||||||
|
|
||||||
def walk_albums(self, ltype, size=None, fromYear=None,toYear=None, genre=None, offset=None):
|
def walk_albums(self, ltype, size=None, fromYear=None,toYear=None, genre=None, offset=None):
|
||||||
"""
|
"""
|
||||||
|
(ID3 tags)
|
||||||
Request all albums for a given genre and iterate over each album.
|
Request all albums for a given genre and iterate over each album.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@ -403,7 +408,8 @@ class SubsonicClient(libsonic.Connection):
|
||||||
|
|
||||||
def walk_album(self, album_id):
|
def walk_album(self, album_id):
|
||||||
"""
|
"""
|
||||||
Request an alum and iterate over each item.
|
(ID3 tags)
|
||||||
|
Request an album and iterate over each item.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
response = self.getAlbum(album_id)
|
response = self.getAlbum(album_id)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#v2.0.1
|
#v2.1.0
|
||||||
#https://github.com/romanvm/script.module.simpleplugin/releases
|
#https://github.com/romanvm/script.module.simpleplugin/releases
|
||||||
|
|
||||||
from simpleplugin import *
|
from simpleplugin import *
|
|
@ -267,6 +267,16 @@ class Addon(object):
|
||||||
"""
|
"""
|
||||||
return self._configdir
|
return self._configdir
|
||||||
|
|
||||||
|
@property
|
||||||
|
def version(self):
|
||||||
|
"""
|
||||||
|
Addon version
|
||||||
|
|
||||||
|
:return: addon version
|
||||||
|
:rtype: str
|
||||||
|
"""
|
||||||
|
return self._addon.getAddonInfo('version')
|
||||||
|
|
||||||
def get_localized_string(self, id_):
|
def get_localized_string(self, id_):
|
||||||
"""
|
"""
|
||||||
Get localized UI string
|
Get localized UI string
|
||||||
|
@ -274,7 +284,7 @@ class Addon(object):
|
||||||
:param id_: UI string ID
|
:param id_: UI string ID
|
||||||
:type id_: int
|
:type id_: int
|
||||||
:return: UI string in the current language
|
:return: UI string in the current language
|
||||||
:rtype: unicode
|
:rtype: str
|
||||||
"""
|
"""
|
||||||
return self._addon.getLocalizedString(id_).encode('utf-8')
|
return self._addon.getLocalizedString(id_).encode('utf-8')
|
||||||
|
|
||||||
|
@ -327,7 +337,7 @@ class Addon(object):
|
||||||
value = str(value)
|
value = str(value)
|
||||||
self._addon.setSetting(id_, value)
|
self._addon.setSetting(id_, value)
|
||||||
|
|
||||||
def log(self, message, level=0):
|
def log(self, message, level=xbmc.LOGDEBUG):
|
||||||
"""
|
"""
|
||||||
Add message to Kodi log starting with Addon ID
|
Add message to Kodi log starting with Addon ID
|
||||||
|
|
||||||
|
@ -339,7 +349,7 @@ class Addon(object):
|
||||||
"""
|
"""
|
||||||
if isinstance(message, unicode):
|
if isinstance(message, unicode):
|
||||||
message = message.encode('utf-8')
|
message = message.encode('utf-8')
|
||||||
xbmc.log('{0}: {1}'.format(self.id, message), level)
|
xbmc.log('{0} [v.{1}]: {2}'.format(self.id, self.version, message), level)
|
||||||
|
|
||||||
def log_notice(self, message):
|
def log_notice(self, message):
|
||||||
"""
|
"""
|
||||||
|
@ -879,7 +889,6 @@ class Plugin(Addon):
|
||||||
self.log_debug('Creating listing from {0}'.format(str(context)))
|
self.log_debug('Creating listing from {0}'.format(str(context)))
|
||||||
if context.content is not None:
|
if context.content is not None:
|
||||||
xbmcplugin.setContent(self._handle, context.content) # This must be at the beginning
|
xbmcplugin.setContent(self._handle, context.content) # This must be at the beginning
|
||||||
listing = []
|
|
||||||
for item in context.listing:
|
for item in context.listing:
|
||||||
is_folder = item.get('is_folder', True)
|
is_folder = item.get('is_folder', True)
|
||||||
if item.get('list_item') is not None:
|
if item.get('list_item') is not None:
|
||||||
|
@ -889,8 +898,7 @@ class Plugin(Addon):
|
||||||
if item.get('is_playable'):
|
if item.get('is_playable'):
|
||||||
list_item.setProperty('IsPlayable', 'true')
|
list_item.setProperty('IsPlayable', 'true')
|
||||||
is_folder = False
|
is_folder = False
|
||||||
listing.append((item['url'], list_item, is_folder))
|
xbmcplugin.addDirectoryItem(self._handle, item['url'], list_item, is_folder)
|
||||||
xbmcplugin.addDirectoryItems(self._handle, listing, len(listing))
|
|
||||||
if context.sort_methods is not None:
|
if context.sort_methods is not None:
|
||||||
[xbmcplugin.addSortMethod(self._handle, method) for method in context.sort_methods]
|
[xbmcplugin.addSortMethod(self._handle, method) for method in context.sort_methods]
|
||||||
xbmcplugin.endOfDirectory(self._handle,
|
xbmcplugin.endOfDirectory(self._handle,
|
||||||
|
|
|
@ -73,7 +73,7 @@ msgid "Allow self signed certificates"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgctxt "#30017"
|
msgctxt "#30017"
|
||||||
msgid "Cache (in minutes) - not yet implemented"
|
msgid "Cache (in minutes)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgctxt "#30018"
|
msgctxt "#30018"
|
||||||
|
@ -81,7 +81,7 @@ msgid "Cache datas time"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgctxt "#30019"
|
msgctxt "#30019"
|
||||||
msgid "Artists"
|
msgid "Library"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgctxt "#30020"
|
msgctxt "#30020"
|
||||||
|
@ -140,3 +140,15 @@ msgstr ""
|
||||||
msgctxt "#30035"
|
msgctxt "#30035"
|
||||||
msgid "Download"
|
msgid "Download"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgctxt "#30036"
|
||||||
|
msgid "Starred tracks"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgctxt "#30037"
|
||||||
|
msgid "Random tracks"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgctxt "#30038"
|
||||||
|
msgid "Browse"
|
||||||
|
msgstr ""
|
||||||
|
|
|
@ -46,7 +46,7 @@ msgstr "Télécharger"
|
||||||
|
|
||||||
msgctxt "#30009"
|
msgctxt "#30009"
|
||||||
msgid "Download folder"
|
msgid "Download folder"
|
||||||
msgstr "Télécharger le répertoire"
|
msgstr "Répertoire de téléchargement"
|
||||||
|
|
||||||
msgctxt "#30010"
|
msgctxt "#30010"
|
||||||
msgid "Streaming"
|
msgid "Streaming"
|
||||||
|
@ -73,16 +73,16 @@ msgid "Allow self signed certificates"
|
||||||
msgstr "Autoriser les certificats auto-signés"
|
msgstr "Autoriser les certificats auto-signés"
|
||||||
|
|
||||||
msgctxt "#30017"
|
msgctxt "#30017"
|
||||||
msgid "Cache (in minutes) - not yet implemented"
|
msgid "Cache (in minutes)"
|
||||||
msgstr "Cache (en minutes) - pas encore implémenté"
|
msgstr "Cache (en minutes)"
|
||||||
|
|
||||||
msgctxt "#30018"
|
msgctxt "#30018"
|
||||||
msgid "Cache datas time"
|
msgid "Cache datas time"
|
||||||
msgstr "Durée du cache pour les données"
|
msgstr "Durée du cache pour les données"
|
||||||
|
|
||||||
msgctxt "#30019"
|
msgctxt "#30019"
|
||||||
msgid "Artists"
|
msgid "Library"
|
||||||
msgstr "Artistes"
|
msgstr "Bibliothèque"
|
||||||
|
|
||||||
msgctxt "#30020"
|
msgctxt "#30020"
|
||||||
msgid "Albums"
|
msgid "Albums"
|
||||||
|
@ -139,3 +139,15 @@ msgstr "Retirer des favoris Subsonic"
|
||||||
msgctxt "#30035"
|
msgctxt "#30035"
|
||||||
msgid "Download"
|
msgid "Download"
|
||||||
msgstr "Télécharger"
|
msgstr "Télécharger"
|
||||||
|
|
||||||
|
msgctxt "#30036"
|
||||||
|
msgid "Starred tracks"
|
||||||
|
msgstr "Pistes favorites"
|
||||||
|
|
||||||
|
msgctxt "#30037"
|
||||||
|
msgid "Random tracks"
|
||||||
|
msgstr "Pistes au hasard"
|
||||||
|
|
||||||
|
msgctxt "#30038"
|
||||||
|
msgid "Browse"
|
||||||
|
msgstr "Parcourir"
|
||||||
|
|
|
@ -73,16 +73,16 @@ msgid "Allow self signed certificates"
|
||||||
msgstr "Erlaube eigensignierte Zertifikate"
|
msgstr "Erlaube eigensignierte Zertifikate"
|
||||||
|
|
||||||
msgctxt "#30017"
|
msgctxt "#30017"
|
||||||
msgid "Cache (in minutes) - not yet implemented"
|
msgid "Cache (in minutes)"
|
||||||
msgstr "Speicher (in Minuten) - noch nicht eingebaut"
|
msgstr "Speicher (in Minuten)"
|
||||||
|
|
||||||
msgctxt "#30018"
|
msgctxt "#30018"
|
||||||
msgid "Cache datas time"
|
msgid "Cache datas time"
|
||||||
msgstr "Speicher Daten Zeit"
|
msgstr "Speicher Daten Zeit"
|
||||||
|
|
||||||
msgctxt "#30019"
|
msgctxt "#30019"
|
||||||
msgid "Artists"
|
msgid "Library"
|
||||||
msgstr "Künstler"
|
msgstr "Bibliothek"
|
||||||
|
|
||||||
msgctxt "#30020"
|
msgctxt "#30020"
|
||||||
msgid "Albums"
|
msgid "Albums"
|
||||||
|
@ -140,3 +140,14 @@ msgctxt "#30035"
|
||||||
msgid "Download"
|
msgid "Download"
|
||||||
msgstr "Herunterladen"
|
msgstr "Herunterladen"
|
||||||
|
|
||||||
|
msgctxt "#30036"
|
||||||
|
msgid "Starred tracks"
|
||||||
|
msgstr "Lieblings lieder"
|
||||||
|
|
||||||
|
msgctxt "#30037"
|
||||||
|
msgid "Random tracks"
|
||||||
|
msgstr "Zufällig lieder"
|
||||||
|
|
||||||
|
msgctxt "#30038"
|
||||||
|
msgid "Browse"
|
||||||
|
msgstr "Durchsuchen"
|
||||||
|
|
|
@ -20,9 +20,9 @@
|
||||||
<category label="30013">
|
<category label="30013">
|
||||||
<setting label="30001" type="lsep" />
|
<setting label="30001" type="lsep" />
|
||||||
<setting label="30014" id="apiversion" type="labelenum" values="1.11.0|1.12.0|1.13.0|1.14.0" default="1.13.0"/>
|
<setting label="30014" id="apiversion" type="labelenum" values="1.11.0|1.12.0|1.13.0|1.14.0" default="1.13.0"/>
|
||||||
<setting id="insecure" type="bool" default="false" />
|
<setting label="30016" id="insecure" type="bool" default="false" />
|
||||||
<setting label="30016" type="lsep" />
|
<setting label="30017" type="lsep" />
|
||||||
<setting label="30018" id="cachetime" type="labelenum" default="5" values="1|5|15|30|60|120|180|720|1440"/>
|
<setting label="30018" id="cachetime" type="labelenum" default="15" values="1|5|15|30|60|120|180|720|1440"/>
|
||||||
|
|
||||||
</category>
|
</category>
|
||||||
</settings>
|
</settings>
|
||||||
|
|
Loading…
Reference in New Issue