Skip to content

Commit

Permalink
Add support for HTTP protocol to access a remote Kodi
Browse files Browse the repository at this point in the history
  • Loading branch information
romanvm committed Apr 2, 2024
1 parent d992e37 commit 8098308
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
6 changes: 4 additions & 2 deletions plugin.video.external.library/libs/kodi_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ def get_remote_kodi_url(with_credentials=False):
port = ADDON.getSetting('kodi_port')
login = ADDON.getSetting('kodi_login')
password = ADDON.getSetting('kodi_password')
use_https = ADDON.getSettingBool('use_https')
protocol = 'https' if use_https else 'http'
if not with_credentials or not login:
return f'http://{host}:{port}'
return f'http://{login}:{password}@{host}:{port}'
return f'{protocol}://{host}:{port}'
return f'{protocol}://{login}:{password}@{host}:{port}'
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,7 @@ msgstr ""
msgctxt "#32028"
msgid "Recently added music videos"
msgstr ""

msgctxt "#32029"
msgid "Use HTTPS"
msgstr ""
5 changes: 5 additions & 0 deletions plugin.video.external.library/resources/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
<heading>32002</heading>
</control>
</setting>
<setting id="use_https" type="boolean" label="32029" help="">
<level>0</level>
<default>true</default>
<control type="toggle"/>
</setting>
<setting id="kodi_login" type="string" label="32013" help="">
<level>0</level>
<default/>
Expand Down

0 comments on commit 8098308

Please sign in to comment.