librespot: Add new setting for zerconf port

This commit is contained in:
Alexander Koenig 2021-09-26 12:14:18 +02:00
parent 11a539837f
commit b5b722fab4
6 changed files with 18 additions and 7 deletions

View File

@ -1,3 +1,6 @@
129
- Python: add new setting for zeroconf port
128 128
- Python: fix Librespot output is utf-8 - Python: fix Librespot output is utf-8

View File

@ -5,7 +5,7 @@
PKG_NAME="librespot" PKG_NAME="librespot"
PKG_VERSION="0.1.6" PKG_VERSION="0.1.6"
PKG_SHA256="7506b4448d3ae0eba063cd711baebdc23444c706c87d0551d5a4cbc623e70f30" PKG_SHA256="7506b4448d3ae0eba063cd711baebdc23444c706c87d0551d5a4cbc623e70f30"
PKG_REV="128" PKG_REV="129"
PKG_ARCH="any" PKG_ARCH="any"
PKG_LICENSE="MIT" PKG_LICENSE="MIT"
PKG_SITE="https://github.com/librespot-org/librespot/" PKG_SITE="https://github.com/librespot-org/librespot/"

View File

@ -30,3 +30,7 @@ msgstr ""
msgctxt "#30106" msgctxt "#30106"
msgid "RTP Port" msgid "RTP Port"
msgstr "" msgstr ""
msgctxt "#30107"
msgid "Connect Port"
msgstr ""

View File

@ -15,6 +15,7 @@ DEFAULTS = dict(
password='', password='',
rtp_dest='127.0.0.1', rtp_dest='127.0.0.1',
rtp_port='24642', rtp_port='24642',
connect_port='0',
username='', username='',
) )

View File

@ -37,6 +37,8 @@ class Librespot(xbmc.Player):
settings = get_settings() settings = get_settings()
quoted = {k: shlex.quote(v) for (k, v) in settings.items()} quoted = {k: shlex.quote(v) for (k, v) in settings.items()}
command = LIBRESPOT command = LIBRESPOT
if settings['connect_port'] != "0":
command += ' --zeroconf-port %s ' % settings['connect_port']
if settings['autoplay'] == 'true': if settings['autoplay'] == 'true':
command += LIBRESPOT_AUTOPLAY command += LIBRESPOT_AUTOPLAY
if (settings['discovery'] == 'false' and if (settings['discovery'] == 'false' and

View File

@ -1,11 +1,12 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?> <?xml version="1.0" encoding="utf-8" standalone="yes"?>
<settings> <settings>
<category label="30100"> <category label="30100">
<setting label="30101" id="autoplay" type="bool" default="true" /> <setting label="30101" id="autoplay" type="bool" default="true" />
<setting label="30102" id="discovery" type="bool" default="true" /> <setting label="30102" id="discovery" type="bool" default="true" />
<setting label="30103" id="username" type="text" default="" subsetting="true" visible="eq(-1,false)" /> <setting label="30103" id="username" type="text" default="" subsetting="true" visible="eq(-1,false)" />
<setting label="30104" id="password" type="text" default="" subsetting="true" visible="eq(-2,false)" option="hidden" /> <setting label="30104" id="password" type="text" default="" subsetting="true" visible="eq(-2,false)" option="hidden" />
<setting label="30105" id="name" type="text" default="Librespot@{}" /> <setting label="30105" id="name" type="text" default="Librespot@{}" />
<setting label="30106" id="rtp_port" type="number" default="24642" /> <setting label="30106" id="rtp_port" type="number" default="24642" />
<setting label="30107" id="connect_port" type="number" default="0" />
</category> </category>
</settings> </settings>