Skip to content

Commit

Permalink
[script.service.hyperion-control] 20.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Lord-Grey committed Aug 25, 2023
1 parent 2423980 commit 8eef9ce
Show file tree
Hide file tree
Showing 12 changed files with 8 additions and 41 deletions.
5 changes: 4 additions & 1 deletion script.service.hyperion-control/addon.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon id="script.service.hyperion-control" name="Hyperion Control" version="20.0.0" provider-name="hyperion-project">
<requires>
<import addon="xbmc.addon" version="20.0.0"/>
<import addon="xbmc.addon" version="20.0.1"/>
<import addon="xbmc.python" version="3.0.1"/>
<import addon="script.module.requests" version="2.3.0"/>
</requires>
Expand All @@ -17,6 +17,9 @@
<website>https://hyperion-project.org/forum</website>
<source>https://github.com/hyperion-project/hyperion.control</source>
<news>
20.0.1
- Removed redundant debug setting

20.0.0
- Kodi 20 (Nexus) support
- Multi instance handling
Expand Down
1 change: 1 addition & 0 deletions script.service.hyperion-control/resources/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Hyperion control addon resources."""
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ msgctxt "#32005"
msgid "Disable Hyperion on shutdown"
msgstr "Deaktiviere Hyperion beim Beenden"

#:
msgctxt "#32006"
msgid "Enable Debug"
msgstr "Aktiviere Debugging"

#:
msgctxt "#32007"
msgid "Show changelog after update"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ msgctxt "#32005"
msgid "Disable Hyperion on shutdown"
msgstr "Disable Hyperion on shutdown"

#:
msgctxt "#32006"
msgid "Enable Debug"
msgstr "Enable Debug"

#:
msgctxt "#32007"
msgid "Show changelog after update"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ msgctxt "#32005"
msgid "Disable Hyperion on shutdown"
msgstr "Deshabilitar Hyperion al apagar"

#:
msgctxt "#32006"
msgid "Enable Debug"
msgstr "Habilitar la Depuración"

#:
msgctxt "#32007"
msgid "Show changelog after update"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ msgctxt "#32005"
msgid "Disable Hyperion on shutdown"
msgstr "Désactiver Hyperion à l'extinction"

#:
msgctxt "#32006"
msgid "Enable Debug"
msgstr "Activer le débogage"

#:
msgctxt "#32007"
msgid "Show changelog after update"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ msgctxt "#32005"
msgid "Disable Hyperion on shutdown"
msgstr "Hyperion kikapcsolása leállításkor"

#:
msgctxt "#32006"
msgid "Enable Debug"
msgstr "Hibakeresés engedélyezése"

#:
msgctxt "#32007"
msgid "Show changelog after update"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ msgctxt "#32005"
msgid "Disable Hyperion on shutdown"
msgstr "Wyłącz Hyperion przy zamknięciu systemu"

#:
msgctxt "#32006"
msgid "Enable Debug"
msgstr "Włącz debugowanie"

#:
msgctxt "#32007"
msgid "Show changelog after update"
Expand Down
3 changes: 1 addition & 2 deletions script.service.hyperion-control/resources/lib/hyperion.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ def _initialize(self) -> None:

def notify(self, command: str) -> None:
"""Process the commands sent by the observables."""
if self._settings.debug:
self._logger.log(f"received command: {command}")
self._logger.log(f"received command: {command}")
if command == "updateSettings":
self.update_settings()
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ class SettingsManager(Protocol):
menu_enabled: bool
show_changelog_on_update: bool
tasks: int
debug: bool
first_run: bool

@property
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ def __init__(
self.menu_enabled: bool
self.show_changelog_on_update: bool
self.tasks: int
self.debug: bool
self.first_run: bool
self.read_settings()

Expand Down Expand Up @@ -108,7 +107,7 @@ def _set_bool(self, name: str, value: bool) -> None:
def _log_set_outcome(self, name: str, value: Any, outcome: bool) -> None:
if not outcome:
self._logger.error(f"Error setting {name} to {value} (outcome={outcome})")
elif self.debug:
else:
self._logger.log(f"Set {name} to {value}")

def set_tasks(self, value: int) -> None:
Expand Down Expand Up @@ -140,7 +139,6 @@ def read_settings(self) -> None:
self.enable_hyperion = get_bool("enableHyperion")
self.disable_hyperion = get_bool("disableHyperion")
self.show_changelog_on_update = get_bool("showChangelogOnUpdate")
self.debug = get_bool("debug")
self.first_run = get_bool("firstRun")
self.current_version = get_string("currAddonVersion")

Expand All @@ -155,8 +153,7 @@ def read_settings(self) -> None:
self.tasks = get_int("tasks")
self.rev += 1

if self.debug:
self._log_settings()
self._log_settings()

def _log_settings(self) -> None:
log = self._logger.log
Expand All @@ -172,7 +169,6 @@ def _log_settings(self) -> None:
log(f"Audio enabled: {self.audio_enabled}")
log(f"Pause enabled: {self.pause_enabled}")
log(f"Menu enabled: {self.menu_enabled}")
log(f"Debug enabled: {self.debug}")
log(f"ChangelogOnUpdate: {self.show_changelog_on_update}")
log(f"tasks: {self.tasks}")
log(f"first run: {self.first_run}")
Expand Down
1 change: 0 additions & 1 deletion script.service.hyperion-control/resources/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<setting id="enableHyperion" type="bool" label="32004" default="false" />
<setting id="disableHyperion" type="bool" label="32005" default="false" />
<setting id="showChangelogOnUpdate" type="bool" label="32007" default="true" visible="true" />
<setting id="debug" type="bool" label="32006" default="false" />
<setting id="firstRun" type="bool" label="32000" default="true" visible="false" />
<setting id="currAddonVersion" type="text" default="" visible="false" />
</category>
Expand Down

0 comments on commit 8eef9ce

Please sign in to comment.