Small workaround using OMXPlayer (#7)

This commit is contained in:
Dag Wieers 2020-03-25 07:50:45 +01:00 committed by GitHub
parent 755e342071
commit 3281c41e21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View File

@ -381,6 +381,11 @@ def get_global_setting(key):
return result.get('result', {}).get('value') return result.get('result', {}).get('value')
def set_global_setting(key, value):
"""Set a Kodi setting"""
return jsonrpc(method='Settings.SetSettingValue', params=dict(setting=key, value=value))
def get_cond_visibility(condition): def get_cond_visibility(condition):
"""Test a condition in XBMC""" """Test a condition in XBMC"""
return xbmc.getCondVisibility(condition) return xbmc.getCondVisibility(condition)

View File

@ -35,6 +35,12 @@ class Player:
""" Play the requested item. """ Play the requested item.
:type item: string :type item: string
""" """
# Workaround for Raspberry Pi 3 and older
omxplayer = kodiutils.get_global_setting('videoplayer.useomxplayer')
if omxplayer is False:
kodiutils.set_global_setting('videoplayer.useomxplayer', True)
try: try:
# Check if we have credentials # Check if we have credentials
if not kodiutils.get_setting('username') or not kodiutils.get_setting('password'): if not kodiutils.get_setting('username') or not kodiutils.get_setting('password'):