mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-07-19 21:08:59 +00:00
New hybrid method
This commit is contained in:
parent
7f5084c62e
commit
ace50b34dc
279 changed files with 39526 additions and 19994 deletions
37
resources/lib/objects/utils.py
Normal file
37
resources/lib/objects/utils.py
Normal file
|
@ -0,0 +1,37 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
#################################################################################################
|
||||
|
||||
import logging
|
||||
|
||||
from helper import JSONRPC
|
||||
|
||||
#################################################################################################
|
||||
|
||||
LOG = logging.getLogger("EMBY."+__name__)
|
||||
|
||||
#################################################################################################
|
||||
|
||||
def get_play_action():
|
||||
|
||||
''' I could not figure out a way to listen to kodi setting changes?
|
||||
For now, verify the play action every time play is called.
|
||||
'''
|
||||
options = ['Choose', 'Play', 'Resume', 'Show information']
|
||||
result = JSONRPC('Settings.GetSettingValue').execute({'setting': "myvideos.selectaction"})
|
||||
try:
|
||||
return options[result['result']['value']]
|
||||
except Exception as error:
|
||||
log.error("Returning play action due to error: %s", error)
|
||||
|
||||
return options[1]
|
||||
|
||||
def get_grouped_set():
|
||||
|
||||
''' Get if boxsets should be grouped
|
||||
'''
|
||||
result = JSONRPC('Settings.GetSettingValue').execute({'setting': "videolibrary.groupmoviesets"})
|
||||
try:
|
||||
return result['result']['value']
|
||||
except Exception as error:
|
||||
return False
|
Loading…
Add table
Add a link
Reference in a new issue