Skip to content

Commit

Permalink
[script.timers] 3.8.0 (#2503)
Browse files Browse the repository at this point in the history
  • Loading branch information
Heckie75 authored Aug 18, 2023
1 parent 1e0626c commit 35c11be
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 2 deletions.
5 changes: 4 additions & 1 deletion script.timers/addon.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="script.timers" name="Timers" version="3.7.0" provider-name="Heckie">
<addon id="script.timers" name="Timers" version="3.8.0" provider-name="Heckie">
<requires>
<import addon="xbmc.python" version="3.0.0" />
</requires>
Expand Down Expand Up @@ -66,6 +66,9 @@
<website>https://github.com/Heckie75/kodi-addon-timers</website>
<source>https://github.com/Heckie75/kodi-addon-timers</source>
<news>
v3.8.0 (2023-08-06)
- Context menu quicktimer: Added dialog if item is already scheduled and ask to replace or delete

v3.7.0 (2023-06-30)
- If you stop explicitly playback while a start-stop-timer is running there won't be another stop action anymore when this timer runs out.
- Added workaround that streamed video (probably mpeg-dash) immediately stops after timer has started (only happened if 'seek to correct time if timer starts belatedly' is activated)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,22 @@ msgctxt "#32258"
msgid "No timers to select."
msgstr "Es gibt noch keine Timer zur Auswahl."

msgctxt "#32260"
msgid "This item is already scheduled"
msgstr "Es gibt bereits einen Timer für diese Sendung"

msgctxt "#32261"
msgid "What do you want to do with existing timer?"
msgstr "Was möchtest Du mit dem bestehenden Timer machen?"

msgctxt "#32262"
msgid "Delete"
msgstr "Löschen"

msgctxt "#32263"
msgid "Replace"
msgstr "Ersetzen"

msgctxt "#32270"
msgid "Timer is ending with system action:"
msgstr "Timer ended mit Systemaktion:"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,22 @@ msgctxt "#32258"
msgid "No timers to select."
msgstr ""

msgctxt "#32260"
msgid "This item is already scheduled"
msgstr ""

msgctxt "#32261"
msgid "What do you want to do with existing timer?"
msgstr ""

msgctxt "#32262"
msgid "Delete"
msgstr ""

msgctxt "#32263"
msgid "Replace"
msgstr ""

msgctxt "#32270"
msgid "Timer is ending with system action:"
msgstr ""
Expand Down
27 changes: 26 additions & 1 deletion script.timers/resources/lib/contextmenu/set_quick_epg_timer.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import xbmcgui
from resources.lib.contextmenu.abstract_set_timer import (CONFIRM_YES,
AbstractSetTimer)
from resources.lib.timer.concurrency import (ask_overlapping_timers,
get_next_higher_prio,
get_next_lower_prio)
from resources.lib.timer.timer import Timer
from resources.lib.utils.settings_utils import (CONFIRM_CUSTOM, CONFIRM_ESCAPE,
CONFIRM_NO, CONFIRM_YES,
trigger_settings_changed_event)


class SetQuickEpgTimer(AbstractSetTimer):
Expand All @@ -22,7 +26,28 @@ def perform_ahead(self, timer: Timer) -> bool:
found = i

if found != -1:
timer.id = timers[found].id
rv = xbmcgui.Dialog().yesnocustom(heading=self.addon.getLocalizedString(32260),
message="%s\n\n%s" % (timers[found].format("$L\n$H"), self.addon.getLocalizedString(
32261)),
customlabel=self.addon.getLocalizedString(
32262),
yeslabel=self.addon.getLocalizedString(
32263),
nolabel=self.addon.getLocalizedString(
32022)
)

if rv == CONFIRM_YES:
timer.id = timers[found].id
return True

elif rv == CONFIRM_CUSTOM:
self.storage.delete_timer(timers[found].id)
trigger_settings_changed_event()
xbmcgui.Dialog().notification(self.addon.getLocalizedString(
32000), self.addon.getLocalizedString(32029))

return False

return True

Expand Down

0 comments on commit 35c11be

Please sign in to comment.