Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

Small workaround using OMXPlayer #7

Merged
merged 1 commit into from
Mar 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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