Skip to content

Commit

Permalink
Config/config cache: move SPL cache definition to the top of the file.
Browse files Browse the repository at this point in the history
Move config cache dictionary definition to the top of the file to gruop it with other SPL Config variables.
This will be backported to LTS20.
  • Loading branch information
josephsl committed Jan 23, 2021
1 parent 2a212b2 commit 6e0d590
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions addon/appModules/splstudio/splconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
SPLIni = os.path.join(globalVars.appArgs.configPath, "splstudio.ini")
SPLProfiles = os.path.join(globalVars.appArgs.configPath, "addons", "stationPlaylist", "profiles")
SPLConfig = None
# Cache a copy of the loaded config.
# This comes in handy when saving configuration to disk. For the most part, no change occurs to config.
# This helps prolong life of a solid-state drive (preventing unnecessary writes).
_SPLCache = {}
# The following settings can be changed in profiles:
_mutatableSettings = ("IntroOutroAlarms", "MicrophoneAlarm", "MetadataStreaming", "ColumnAnnouncement")
# 7.0: Profile-specific confspec (might be removed once a more optimal way to validate sections is found).
Expand Down Expand Up @@ -737,12 +741,6 @@ def initialize():
)


# Cache a copy of the loaded config.
# This comes in handy when saving configuration to disk. For the most part, no change occurs to config.
# This helps prolong life of a solid-state drive (preventing unnecessary writes).
_SPLCache = {}


# Close config database if needed.
def closeConfig(splComponent):
global SPLConfig, _SPLCache
Expand Down

0 comments on commit 6e0d590

Please sign in to comment.