Skip to content

Commit

Permalink
Refactor - separate EPG (#1527)
Browse files Browse the repository at this point in the history
* Separate EPG code

This change:
- moves EPG code into its own controller

This change does not:
- optimise EPG code

Known issues:
- none known

* Optimise EPGCache lookup to run *once* for all channels rather than per channel
* This consequently removes `getNowEvent` and `getNextEvent` functions
* Updated `load`/`save` acknowledgement text
* Use ints for const values
* Make debug mode configurable
  • Loading branch information
wedebe committed Jul 6, 2022
1 parent 0b2af1b commit 28b85ed
Show file tree
Hide file tree
Showing 6 changed files with 628 additions and 141 deletions.
14 changes: 8 additions & 6 deletions plugin/controllers/ajax.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,14 @@ def P_eventdescription(self, request):

def P_event(self, request):
event = getEvent(getUrlArg(request, "sref"), getUrlArg(request, "idev"))
event['event']['recording_margin_before'] = config.recording.margin_before.value
event['event']['recording_margin_after'] = config.recording.margin_after.value
event['at'] = HASAUTOTIMER
event['transcoding'] = TRANSCODING
event['moviedb'] = config.OpenWebif.webcache.moviedb.value if config.OpenWebif.webcache.moviedb.value else EXT_EVENT_INFO_SOURCE
event['extEventInfoProvider'] = extEventInfoProvider = getEventInfoProvider(event['moviedb'])
if event:
# TODO: this shouldn't really be part of an event's data
event['event']['recording_margin_before'] = config.recording.margin_before.value
event['event']['recording_margin_after'] = config.recording.margin_after.value
event['at'] = HASAUTOTIMER
event['transcoding'] = TRANSCODING
event['moviedb'] = config.OpenWebif.webcache.moviedb.value if config.OpenWebif.webcache.moviedb.value else EXT_EVENT_INFO_SOURCE
event['extEventInfoProvider'] = extEventInfoProvider = getEventInfoProvider(event['moviedb'])
return event

def P_about(self, request):
Expand Down
Loading

1 comment on commit 28b85ed

@original-birdman
Copy link
Contributor

@original-birdman original-birdman commented on 28b85ed Jan 24, 2023

Choose a reason for hiding this comment

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

This commit breaks /web/epgbouquet code by adding an endTime parameter to it.

That parameter should only exist for /web/epgmulti.

/web/epgbouquet is only meant to return the data at a single point in time. It is now returning the entire EPG for the given bouquet, which means that the Android app dreamDroid can now timeout waiting for an unexpectedly large return data set.

Please sign in to comment.