Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the update check interval a setting parameter #140, #131 #145

Merged
merged 5 commits into from
Apr 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions resources/language/resource.language.de_de/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 4 additions & 0 deletions resources/language/resource.language.en_gb/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 4 additions & 0 deletions resources/language/resource.language.it_it/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -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]"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hier gibt es 30119, bei de und en sehe ich den #30119 nicht. Hab ich den nur übersehen?

msgctxt "#30171"
msgid "Aired Date"
msgstr "Data di Trasmissione"
Expand Down
2 changes: 1 addition & 1 deletion resources/lib/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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: {})',
Expand Down
1 change: 1 addition & 0 deletions resources/lib/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
1 change: 1 addition & 0 deletions resources/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<setting id="maxresults" type="slider" label="30115" default="1000" range="100,100,3000" option="int" />
<setting id="maxage" type="slider" label="30116" default="2" range="1,30" option="int" />
<setting id="recentmode" type="enum" label="30117" default="0" lvalues="30171|30172" />
<setting id="updateCheckInterval" type="slider" label="30118" default="15" range="15,600" option="int" />
</category>
<category label="30002">
<setting id="dbtype" type="enum" label="30210" default="0" lvalues="30221|30222" />
Expand Down