Skip to content

Commit

Permalink
Small workaround using OMXPlayer
Browse files Browse the repository at this point in the history
  • Loading branch information
dagwieers committed Mar 24, 2020
1 parent f15adcf commit a682f46
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions resources/lib/kodiutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,11 @@ def get_global_setting(key):
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):
"""Test a condition in XBMC"""
return xbmc.getCondVisibility(condition)
Expand Down
6 changes: 6 additions & 0 deletions resources/lib/modules/player.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ def play(item):
""" Play the requested item.
: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:
# Check if we have credentials
if not kodiutils.get_setting('username') or not kodiutils.get_setting('password'):
Expand Down

0 comments on commit a682f46

Please sign in to comment.