mirror of
https://github.com/gordielachance/plugin.audio.subsonic
synced 2025-02-16 19:50:56 +01:00
commit
426dcf964f
@ -1,5 +1,10 @@
|
||||
# Changelog
|
||||
|
||||
## v3.0.0
|
||||
* Forked from original repos
|
||||
* Added video support
|
||||
* Added Search
|
||||
|
||||
## v2.0.6
|
||||
Released 14 January 2017
|
||||
* Upgrade to simpleplugin 2.1.0
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<addon id="plugin.audio.subsonic" name="Subsonic" version="2.0.6" provider-name="BasilFX,grosbouff">
|
||||
<addon id="plugin.audio.subsonic" name="Subsonic" version="3.0.0" provider-name="BasilFX,grosbouff,silascutler">
|
||||
<requires>
|
||||
<import addon="xbmc.python" version="2.14.0"/>
|
||||
<import addon="script.module.dateutil" version="2.4.2"/>
|
||||
@ -38,7 +38,7 @@
|
||||
<license>MIT</license>
|
||||
<forum></forum>
|
||||
<website>http://www.subsonic.org</website>
|
||||
<source>https://github.com/gordielachance/plugin.audio.subsonic</source>
|
||||
<source>https://github.com/silascutler/KodiSubsonic</source>
|
||||
<email></email>
|
||||
</extension>
|
||||
</addon>
|
||||
|
39
main.py
39
main.py
@ -103,7 +103,12 @@ def root(params):
|
||||
'name': Addon().get_localized_string(30022),
|
||||
'callback': 'list_playlists',
|
||||
'thumb': None
|
||||
}
|
||||
},
|
||||
'search': {
|
||||
'name': Addon().get_localized_string(30039),
|
||||
'callback': 'search',
|
||||
'thumb': None
|
||||
},
|
||||
}
|
||||
|
||||
# Iterate through categories
|
||||
@ -612,6 +617,38 @@ def list_playlists(params):
|
||||
#view_mode = None, #a numeric code for a skin view mode. View mode codes are different in different skins except for 50 (basic listing).
|
||||
#content = None #string - current plugin content, e.g. ‘movies’ or ‘episodes’.
|
||||
)
|
||||
@plugin.action()
|
||||
#@plugin.cached(cachetime) #cache (in minutes)
|
||||
def search(params):
|
||||
|
||||
dialog = xbmcgui.Dialog()
|
||||
d = dialog.input(Addon().get_localized_string(30039), type=xbmcgui.INPUT_ALPHANUM)
|
||||
if not d:
|
||||
d = " "
|
||||
|
||||
|
||||
# get connection
|
||||
connection = get_connection()
|
||||
|
||||
if connection is False:
|
||||
return
|
||||
|
||||
listing = []
|
||||
|
||||
# Get items
|
||||
items = connection.search2(query=d)
|
||||
# Iterate through items
|
||||
for item in items.get('searchResult2').get('song'):
|
||||
entry = get_entry_track( item, params)
|
||||
listing.append(entry)
|
||||
|
||||
if len(listing) == 1:
|
||||
plugin.log('One single Media Folder found; do return listing from browse_indexes()...')
|
||||
return browse_indexes(params)
|
||||
else:
|
||||
return plugin.create_listing(listing)
|
||||
|
||||
|
||||
|
||||
@plugin.action()
|
||||
def play_track(params):
|
||||
|
@ -152,3 +152,9 @@ msgstr ""
|
||||
msgctxt "#30038"
|
||||
msgid "Browse"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30039"
|
||||
msgid "Search"
|
||||
msgstr ""
|
||||
|
||||
|
||||
|
@ -151,3 +151,10 @@ msgstr "Pistes au hasard"
|
||||
msgctxt "#30038"
|
||||
msgid "Browse"
|
||||
msgstr "Parcourir"
|
||||
|
||||
|
||||
msgctxt "#30039"
|
||||
msgid "Chercher"
|
||||
msgstr ""
|
||||
|
||||
|
||||
|
@ -151,3 +151,8 @@ msgstr "Zufällig lieder"
|
||||
msgctxt "#30038"
|
||||
msgid "Browse"
|
||||
msgstr "Durchsuchen"
|
||||
|
||||
msgctxt "#30039"
|
||||
msgid "Suche"
|
||||
msgstr ""
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user