Small workaround using OMXPlayer (#7)
This commit is contained in:
parent
755e342071
commit
3281c41e21
@ -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)
|
||||||
|
@ -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'):
|
||||||
|
Loading…
Reference in New Issue
Block a user