-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
[epg] start epg container asynchronously #6937
Conversation
6ce5e4b
to
34c364f
Compare
Have checked, does not work. The bool CPVRManager::CreateChannelEpgs(void)
{
...
m_bEpgsCreated = m_channelGroups->CreateChannelEpgs();
...
} returns false and on void CEpgContainer::Process(void)
{
...
if (!InterruptUpdate() && bUpdateEpg && g_PVRManager.EpgsCreated() && UpdateEPG())
...
} the "UpdateEPG" becomes never called. EDIT: Was occurred after database reset and also if database was deleted before. |
there are issues when starting playback on a channel which has no valid epg. info shown on OSD seems to get not updated when there is a valid egp. |
34c364f
to
d668a8c
Compare
@AlwinEsch thanks for pointing this out, it's now fixed. |
@xhaggi have you ever tried not to store EGP in the db? probably not or you would have observed this issue. Not storing EPG in pvr db is default scenario for vnsi because vdr has its own db for EPG and startup is much faster this way. |
@FernetMenta sure and that's why I want to load the epg data from the database async because IMO this shouldn't block the PVR manager startup. @AlwinEsch sorry my fix won't work :( |
it would cause a regression for vnsi which already starts up very fast. I am not opposed to this but the issue mentioned should be fixed first. |
I don't want to change the way how we get clients epg information into kodi. After a second look we should think about the way we load the data from our database. IMO we should load the client data first and later the data we stored in our database (async). If the related epg data already exists in memory we can skip it from being created from our database data. Currently we load the epg from our database first and later the epg data from the client and decide if we need to update the epg data in our database which is IMO not the right order. |
In case of VNSI the db is never used so what is loaded first does not matter. The point is that when a channel is started some data is pulled from EPG container which never gets updated during playback. start a channels with no EPG, then trigger EPG update for the channel playing. |
Fine for VNSI then. This PR ( if it works ;o) ) addresses all backends which relies on kodi's database.
Yep i know this issue. We can look into it in the next few weeks, where we can't push new stuff. |
This should be fixed before this PR goes in. Otherwise it makes things worse for vnsi. |
d668a8c
to
7b29f5a
Compare
7b29f5a
to
24e7387
Compare
@FernetMenta with the changes I've done in #7667 now the async startup of the epg container does not introduce any regression. It will speed-up things a lot. I would prefer to merge this after #7667 goes in. @opdenkamp @ksooo @Jalle19 any objections |
very nice and thank you very much! Now epg gets visible right after vnsiserver requests an update. |
ah does it mean you've tested #7667 on top of this? |
I merged both for the test. |
great, thanks :) |
No objections from my side. Not runtime tested, but code changes are looking straight forward to me. |
jenkins build this please |
[epg] start epg container asynchronously
this seems to have broken things for me, my EPG is never loaded (no calls to GetEpgForChannel() are ever made). I have tried with "do not store EPG in database" option enabled and disabled but am getting the problem in both cases. If i hardcode the bAsync variable in EpgContainer.Start() to false, my EPG loads fine again, which is why I think it is this change. Any advice on how to further troubleshoot? |
please provide some more information:
|
My debugging leads me to
The function is exiting at this point because EpgContainer is not started, so it never proceeds on to call CreateChannelEpg() When I set bAsync to false in Version Info: Im running this branch which is the #7626 [PVR] API 3.0.0 Changes PR rebased on top of latest kodi master (commit fb174d6) |
@ryangribble could you please move https://github.com/xbmc/xbmc/blob/master/xbmc/epg/EpgContainer.cpp#L174 to https://github.com/xbmc/xbmc/blob/master/xbmc/epg/EpgContainer.cpp#L187 and try if this will fix the issue. If so I'll create a PR asap. |
OK so that made the Epg load however it loaded each channel EPG about 11 times back to back before it finally stopped :) |
I can't reproduce the issue. I've added a debug log to |
please checkout the current master without anything else. we need the same version for testing things. |
@ryangribble see #7734 |
As the title said this adds asynchronously start of the EPG container which do not block the entire PVR manager startup and results in a really fast resumption of playback for the last played channel if you enable "continue last played channel" in TV settings.
@opdenkamp or @Jalle19 ping