diff --git a/script.nhlscores/addon.xml b/script.nhlscores/addon.xml index 99e18c0a9..cffc2568c 100644 --- a/script.nhlscores/addon.xml +++ b/script.nhlscores/addon.xml @@ -1,5 +1,5 @@ - + @@ -12,7 +12,7 @@ Live scoring and game updates via kodi notifications - - Fixed for upstream api changes + - Add ability to set a delay before displaying notifications en all diff --git a/script.nhlscores/resources/language/resource.language.en_gb/strings.po b/script.nhlscores/resources/language/resource.language.en_gb/strings.po index 9ca3098f0..d2c8f17f2 100644 --- a/script.nhlscores/resources/language/resource.language.en_gb/strings.po +++ b/script.nhlscores/resources/language/resource.language.en_gb/strings.po @@ -24,6 +24,10 @@ msgctxt "#30330" msgid "Seconds to Display" msgstr "" +msgctxt "#30335" +msgid "Seconds to Delay Notifictaions" +msgstr "" + msgctxt "#30340" msgid "Include Goal Description" msgstr "" diff --git a/script.nhlscores/resources/lib/scores.py b/script.nhlscores/resources/lib/scores.py index 590c9b784..3d0c7e061 100644 --- a/script.nhlscores/resources/lib/scores.py +++ b/script.nhlscores/resources/lib/scores.py @@ -237,6 +237,8 @@ def check_if_changed(self, new_item, old_item): if self.addon.getSetting(id="goal_desc") == 'true' and new_item['headshot'] != '': img = new_item['headshot'] if title is not None and message is not None: + # Delay displaying notification X seconds + self.monitor.waitForAbort(int(self.addon.getSetting(id="delay_seconds"))) self.notify(title, message, img) self.monitor.waitForAbort(self.display_seconds + 5) diff --git a/script.nhlscores/resources/settings.xml b/script.nhlscores/resources/settings.xml index 5ecada915..0bf25e5e5 100644 --- a/script.nhlscores/resources/settings.xml +++ b/script.nhlscores/resources/settings.xml @@ -24,6 +24,18 @@ false + + 0 + 0 + + 0 + 5 + 180 + + + false + + 0 true