PlexKodiConnect/resources/lib/state.py

140 lines
3.8 KiB
Python
Raw Normal View History

# -*- coding: utf-8 -*-
# THREAD SAFE
# Quit PKC
STOP_PKC = False
2017-05-17 21:55:24 +10:00
# Usually triggered by another Python instance - will have to be set (by
# polling window) through e.g. librarysync thread
SUSPEND_LIBRARY_THREAD = False
# Set if user decided to cancel sync
STOP_SYNC = False
2017-08-19 23:03:19 +10:00
# Could we access the paths?
PATH_VERIFIED = False
2017-05-17 21:55:24 +10:00
# Set if a Plex-Kodi DB sync is being done - along with
# window('plex_dbScan') set to 'true'
DB_SCAN = False
# Plex Media Server Status - along with window('plex_serverStatus')
PMS_STATUS = False
# When the userclient needs to wait
SUSPEND_USER_CLIENT = False
# Plex home user? Then "False". Along with window('plex_restricteduser')
RESTRICTED_USER = False
2017-05-17 23:42:12 +10:00
# Direct Paths (True) or Addon Paths (False)? Along with
# window('useDirectPaths')
DIRECT_PATHS = False
# Shall we replace custom user ratings with the number of versions available?
INDICATE_MEDIA_VERSIONS = False
2017-08-22 02:53:38 +10:00
# Do we need to run a special library scan?
RUN_LIB_SCAN = None
2017-05-17 23:57:30 +10:00
# Stemming from the PKC settings.xml
# Shall we show Kodi dialogs when synching?
SYNC_DIALOG = True
2017-08-22 03:42:41 +10:00
# Have we already checked the Kodi DB on consistency?
KODI_DB_CHECKED = False
# Is synching of Plex music enabled?
2017-09-03 21:23:18 +10:00
ENABLE_MUSIC = True
# How often shall we sync?
FULL_SYNC_INTERVALL = 0
# Background Sync enabled at all?
BACKGROUND_SYNC = True
# How long shall we wait with synching a new item to make sure Plex got all
# metadata?
BACKGROUNDSYNC_SAFTYMARGIN = 0
# How many threads to download Plex metadata on sync?
SYNC_THREAD_NUMBER = 0
# What's the time offset between the PMS and Kodi?
KODI_PLEX_TIME_OFFSET = 0.0
# Path remapping mechanism (e.g. smb paths)
# Do we replace \\myserver\path to smb://myserver/path?
REPLACE_SMB_PATH = False
# Do we generally remap?
REMAP_PATH = False
# Mappings for REMAP_PATH:
remapSMBmovieOrg = None
remapSMBmovieNew = None
remapSMBtvOrg = None
remapSMBtvNew = None
remapSMBmusicOrg = None
remapSMBmusicNew = None
remapSMBphotoOrg = None
remapSMBphotoNew = None
# Along with window('plex_authenticated')
AUTHENTICATED = False
2017-05-18 04:22:16 +10:00
# plex.tv username
2017-05-18 00:14:17 +10:00
PLEX_USERNAME = None
2017-05-18 04:22:16 +10:00
# Token for that user for plex.tv
PLEX_TOKEN = None
# Plex ID of that user (e.g. for plex.tv) as a STRING
2017-05-18 00:15:16 +10:00
PLEX_USER_ID = None
2017-05-18 04:22:16 +10:00
# Token passed along, e.g. if playback initiated by Plex Companion. Might be
# another user playing something! Token identifies user
PLEX_TRANSIENT_TOKEN = None
2017-12-08 03:25:48 +11:00
# Plex Companion Queue()
COMPANION_QUEUE = None
# Command Pipeline Queue()
COMMAND_PIPELINE_QUEUE = None
# Websocket_client queue to communicate with librarysync
WEBSOCKET_QUEUE = None
2018-01-22 04:31:49 +11:00
# Which Kodi player is/has been active? (either int 1, 2 or 3)
ACTIVE_PLAYERS = []
2017-12-11 05:01:22 +11:00
# Kodi player states - here, initial values are set
PLAYER_STATES = {
2018-01-22 04:31:49 +11:00
1: {},
2017-12-12 05:24:21 +11:00
2: {},
3: {}
2017-12-11 05:01:22 +11:00
}
2018-01-22 04:31:49 +11:00
# "empty" dict for the PLAYER_STATES above
PLAYSTATE = {
'type': None,
'time': {
'hours': 0,
'minutes': 0,
'seconds': 0,
'milliseconds': 0},
'totaltime': {
'hours': 0,
'minutes': 0,
'seconds': 0,
'milliseconds': 0},
'speed': 0,
'shuffled': False,
'repeat': 'off',
'position': None,
'playlistid': None,
'currentvideostream': -1,
'currentaudiostream': -1,
'subtitleenabled': False,
'currentsubtitle': -1,
'file': None,
'kodi_id': None,
'kodi_type': None,
'plex_id': None,
'plex_type': None,
'container_key': None,
'volume': 100,
'muted': False,
'playmethod': None,
'playcount': None
}
2017-12-14 06:14:27 +11:00
# Dict containing all filenames as keys with plex id as values - used for addon
# paths for playback (since we're not receiving a Kodi id)
PLEX_IDS = {}
2017-12-08 03:25:48 +11:00
PLAYED_INFO = {}
2018-01-22 21:20:37 +11:00
# Set by SpecialMonitor - did user choose to resume playback or start from the
# beginning?
RESUME_PLAYBACK = False
# Kodi webserver details
WEBSERVER_PORT = 8080
WEBSERVER_USERNAME = 'kodi'
WEBSERVER_PASSWORD = ''
WEBSERVER_HOST = 'localhost'