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

[autotimer] sanity check extdesc #1004

Merged
merged 1 commit into from
Sep 6, 2024
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
13 changes: 9 additions & 4 deletions autotimer/src/AutoTimer.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,8 @@ def readXml(self, **kwargs):
# Parse Config
try:
configuration = cet_parse(XML_CONFIG).getroot()
except:
except Exception as error:
doLog("[AutoTimer] An exception occurred:", error)
try:
if os.path.exists(XML_CONFIG + "_old"):
os.rename(XML_CONFIG + "_old", XML_CONFIG + "_old(1)")
Expand Down Expand Up @@ -1114,16 +1115,20 @@ def populateTimerdict(self, epgcache, recordHandler, timerdict, simulateOnly=Fal
if timer.eit is not None:
event = epgcache.lookupEventId(timer.service_ref.ref, timer.eit)
if event:
timer.extdesc = event.getExtendedDescription()
if hasattr(timer, "extdesc"):
if event.getExtendedDescription() and timer.extdesc != event.getExtendedDescription():
timer.extdesc = event.getExtendedDescription()
else:
timer.extdesc = event.getExtendedDescription() or ""
elif check_eit_and_remove and "autotimer" in timer.flags and not timer.isRunning():
remove.append(timer)
continue
else:
remove.append(timer)
continue

if not hasattr(timer, 'extdesc'):
timer.extdesc = ''
if not hasattr(timer, "extdesc"):
timer.extdesc = ""

timerdict[str(timer.service_ref)].append(timer)

Expand Down
2 changes: 2 additions & 0 deletions autotimer/src/AutoTimerEditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -996,6 +996,8 @@ def save(self):

# Offset
if self.offset.value:
if self.justplay.value == "zap" and not self.setEndtime.value:
self.offsetend.value = 0
self.timer.offset = (self.offsetbegin.value * 60, self.offsetend.value * 60)
else:
self.timer.offset = None
Expand Down
Loading