From b511049232ff52508f13cec83624ce3fbf8a152b Mon Sep 17 00:00:00 2001 From: SB Date: Wed, 8 Apr 2020 16:40:24 +0200 Subject: [PATCH 1/5] Make the update check interval a setting parameter #140, #131 --- resources/language/resource.language.de_de/strings.po | 4 ++++ resources/language/resource.language.en_gb/strings.po | 4 ++++ resources/language/resource.language.it_it/strings.po | 4 ++++ resources/lib/service.py | 2 +- resources/lib/settings.py | 3 ++- resources/settings.xml | 1 + 6 files changed, 16 insertions(+), 2 deletions(-) diff --git a/resources/language/resource.language.de_de/strings.po b/resources/language/resource.language.de_de/strings.po index cff26f9..f7efb55 100644 --- a/resources/language/resource.language.de_de/strings.po +++ b/resources/language/resource.language.de_de/strings.po @@ -62,6 +62,10 @@ msgctxt "#30117" msgid "Recent calculated by" msgstr "Neuigkeit berechnet ab" +msgctxt "#30118" +msgid "Up-to-Date check interval [sec]" +msgstr "Nach Updates suchen alle [sec]" + msgctxt "#30171" msgid "Aired Date" msgstr "Sendedatum" diff --git a/resources/language/resource.language.en_gb/strings.po b/resources/language/resource.language.en_gb/strings.po index ac51340..cdf990e 100644 --- a/resources/language/resource.language.en_gb/strings.po +++ b/resources/language/resource.language.en_gb/strings.po @@ -62,6 +62,10 @@ msgctxt "#30117" msgid "Recent calculated by" msgstr "Recent calculated by" +msgctxt "#30118" +msgid "Up-to-Date check interval [sec]" +msgstr "Up-to-Date check interval [sec]" + msgctxt "#30171" msgid "Aired Date" msgstr "Aired Date" diff --git a/resources/language/resource.language.it_it/strings.po b/resources/language/resource.language.it_it/strings.po index 58553d8..fb38fec 100644 --- a/resources/language/resource.language.it_it/strings.po +++ b/resources/language/resource.language.it_it/strings.po @@ -62,6 +62,10 @@ msgctxt "#30117" msgid "Recent calculated by" msgstr "Novità calcolate con" +msgctxt "#30119" +msgid "Default Sort Method for film list" +msgstr "Ordinamento predefinito per l'elenco dei film" + msgctxt "#30171" msgid "Aired Date" msgstr "Data di Trasmissione" diff --git a/resources/lib/service.py b/resources/lib/service.py index 7e649f1..3992af9 100644 --- a/resources/lib/service.py +++ b/resources/lib/service.py @@ -73,7 +73,7 @@ def run(self): self.settings.save_update_instance(self.monitor.instance_id) self.updater.update(False) # Sleep/wait for abort for 60 seconds - if self.monitor.wait_for_abort(15): + if self.monitor.wait_for_abort(self.settings.updateCheckInterval): # Abort was requested while waiting. We should exit break self.info('Shutting down... (instance id: {})', diff --git a/resources/lib/settings.py b/resources/lib/settings.py index df6490e..79ae400 100644 --- a/resources/lib/settings.py +++ b/resources/lib/settings.py @@ -2,7 +2,7 @@ """ The addon settings module -Copyright 2017-2018, Leo Moll and Dominik Schlösser +Copyright 2017-2018, Leo Moll and Dominik Schlösser Licensed under MIT License """ @@ -38,6 +38,7 @@ def load(self): self.maxresults = int(addon.getSetting('maxresults')) self.maxage = int(addon.getSetting('maxage')) * 86400 self.recentmode = int(addon.getSetting('recentmode')) + self.updateCheckInterval = int(addon.getSetting('updateCheckInterval') # database self.type = int(addon.getSetting('dbtype')) self.host = addon.getSetting('dbhost') diff --git a/resources/settings.xml b/resources/settings.xml index 1df4ab1..d127cfa 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -9,6 +9,7 @@ + From c4529887a7a08eee6ce5d8c0858be64565c2672f Mon Sep 17 00:00:00 2001 From: SB Date: Sun, 12 Apr 2020 11:10:44 +0200 Subject: [PATCH 2/5] merge conflict --- resources/lib/settings.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/lib/settings.py b/resources/lib/settings.py index 79ae400..66bbd43 100644 --- a/resources/lib/settings.py +++ b/resources/lib/settings.py @@ -2,7 +2,7 @@ """ The addon settings module -Copyright 2017-2018, Leo Moll and Dominik Schlösser +Copyright 2017-2018, Leo Moll and Dominik Schl�sser Licensed under MIT License """ @@ -38,7 +38,7 @@ def load(self): self.maxresults = int(addon.getSetting('maxresults')) self.maxage = int(addon.getSetting('maxage')) * 86400 self.recentmode = int(addon.getSetting('recentmode')) - self.updateCheckInterval = int(addon.getSetting('updateCheckInterval') + self.updateCheckInterval = int(addon.getSetting('updateCheckInterval')) # database self.type = int(addon.getSetting('dbtype')) self.host = addon.getSetting('dbhost') From fd65745ecc1fa74e2da8d6c58351ce2769b7995d Mon Sep 17 00:00:00 2001 From: SB Date: Sun, 12 Apr 2020 11:12:59 +0200 Subject: [PATCH 3/5] added italien translation --- resources/language/resource.language.it_it/strings.po | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/resources/language/resource.language.it_it/strings.po b/resources/language/resource.language.it_it/strings.po index fb38fec..a8c08a4 100644 --- a/resources/language/resource.language.it_it/strings.po +++ b/resources/language/resource.language.it_it/strings.po @@ -62,6 +62,10 @@ msgctxt "#30117" msgid "Recent calculated by" msgstr "Novità calcolate con" +msgctxt "#30118" +msgid "Up-to-Date check interval [sec]" +msgstr "intervallo di controllo [sec]" + msgctxt "#30119" msgid "Default Sort Method for film list" msgstr "Ordinamento predefinito per l'elenco dei film" From 9ab0f3092d7c6d29f4ba235c0213ad194c163f51 Mon Sep 17 00:00:00 2001 From: SB Date: Wed, 29 Apr 2020 19:51:54 +0200 Subject: [PATCH 4/5] encoding issue on comment --- resources/lib/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lib/settings.py b/resources/lib/settings.py index 66bbd43..8a1038c 100644 --- a/resources/lib/settings.py +++ b/resources/lib/settings.py @@ -2,7 +2,7 @@ """ The addon settings module -Copyright 2017-2018, Leo Moll and Dominik Schl�sser +Copyright 2017-2018, Leo Moll and Dominik Schlösser Licensed under MIT License """ From c1086e10ad3241b0a3d2823ac96f46933e88c237 Mon Sep 17 00:00:00 2001 From: SB Date: Wed, 29 Apr 2020 19:52:29 +0200 Subject: [PATCH 5/5] remove id 30119 since it belongs to a different PR --- resources/language/resource.language.it_it/strings.po | 4 ---- 1 file changed, 4 deletions(-) diff --git a/resources/language/resource.language.it_it/strings.po b/resources/language/resource.language.it_it/strings.po index a8c08a4..b992c56 100644 --- a/resources/language/resource.language.it_it/strings.po +++ b/resources/language/resource.language.it_it/strings.po @@ -66,10 +66,6 @@ msgctxt "#30118" msgid "Up-to-Date check interval [sec]" msgstr "intervallo di controllo [sec]" -msgctxt "#30119" -msgid "Default Sort Method for film list" -msgstr "Ordinamento predefinito per l'elenco dei film" - msgctxt "#30171" msgid "Aired Date" msgstr "Data di Trasmissione"