Skip to content

Commit

Permalink
For timers set via owif do not take the middle for the EIT.
Browse files Browse the repository at this point in the history
This is not fail save, but a quick improvement. Usually you will have at the beginning at least the half or more from the movie. Therefor most likely when you take the sample not at the middle but at eg 20% or so you get a better hit. I know it is not and never 100% but it might give us some time to think about something better. In the situation with openwebif sync the epg is one option but even then you cannot guarantee and here also this idea will improve it. But here you can also check the description.
Taking the begin time and add the marge before recording might be a good
idea but sometimes people might extend this manually as additional
safetumargin so this is also not a good 'trick'.
  • Loading branch information
Littlesat committed Jan 6, 2024
1 parent b4f0951 commit e967304
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions plugin/controllers/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -1080,8 +1080,9 @@ def _AddEditTimer(self, request, mode):
}
elif b"eit" in list(request.args.keys()) and isinstance(request.args[b"eit"][0], int):
eit = int(request.args[b"eit"][0])
else:
queryTime = int(request.args[b"begin"][0]) + (int(request.args[b"end"][0]) - int(request.args[b"begin"][0])) // 2
else
#This might need further investigation. Dp npt get exactly the middle, take 20% so we usually expect to get first event.
queryTime = int(request.args[b"begin"][0]) + (int(request.args[b"end"][0]) - int(request.args[b"begin"][0])) // 5
epg = EPG()
eventid = epg.getEventIdByTime(sRef, queryTime)
if eventid is not None:
Expand Down

2 comments on commit e967304

@68foxboris
Copy link

Choose a reason for hiding this comment

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

| *** File "/usr/lib/enigma2/python/Plugins/Extensions/OpenWebif/controllers/web.py", line 1083
| else
| ^
| SyntaxError: expected ':'

@ims21
Copy link
Contributor

@ims21 ims21 commented on e967304 Jan 6, 2024

Choose a reason for hiding this comment

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

fixed

Please sign in to comment.