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

[script.timers] 3.8.0 #2503

Merged
merged 1 commit into from
Aug 18, 2023
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
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
Loading