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

Allow restart of a PVR addon while it is still creating #4655

Conversation

codesnake
Copy link
Contributor

There's an native addon status ADDON_STATUS_NEED_SETTINGS that means that the addon needs some settings to be set before it will become usable. If ADDON_Create() returns the ADDON_STATUS_NEED_SETTINGS status code and then ADDON_SetSetting() return the same status, XBMC will present the addon settings dialog so the user can enter the missing setting values.

After the user closes the settings dialog XBMC saves settings and requests a restart of the addon (see CAddonStatusHandler::Process()):
m_addon->SaveSettings();
CAddonMgr::Get().GetCallbackForType(m_addon->Type())->RequestRestart(m_addon, true);

But because of an issue in CPVRClients::StopClient(AddonPtr client, bool bRestart) the addon is not restarted and continues running. This commit fixes the issue.

See also this thread of the XBMC forum for discussion of this issue: http://forum.xbmc.org/showthread.php?tid=193750

@xhaggi xhaggi added the Fix label May 5, 2014
@xhaggi
Copy link
Member

xhaggi commented May 5, 2014

looks good.

@jmarshallnz something for gotham?

@xhaggi
Copy link
Member

xhaggi commented May 5, 2014

@codesnake could you please change the commit message and add the [pvr] section prefix?

@xhaggi xhaggi added the Gotham label May 5, 2014
There's an native addon status ADDON_STATUS_NEED_SETTINGS that means that the addon needs some settings to be set before it will become usable. If ADDON_Create() returns the ADDON_STATUS_NEED_SETTINGS status code and then ADDON_SetSetting() return the same status, XBMC will present the addon settings dialog so the user can enter the missing setting values.

After the user closes the settings dialog XBMC saves settings and requests a restart of the addon (see CAddonStatusHandler::Process()):
m_addon->SaveSettings();
CAddonMgr::Get().GetCallbackForType(m_addon->Type())->RequestRestart(m_addon, true);

But because of an issue in CPVRClients::StopClient(AddonPtr client, bool bRestart) the addon is not restarted and continues running. This commit fixes the issue.

See also this thread of the XBMC forum for discussion of this issue: http://forum.xbmc.org/showthread.php?tid=193750
@codesnake
Copy link
Contributor Author

@xhaggi Done.

@xhaggi
Copy link
Member

xhaggi commented May 5, 2014

thanks

@jmarshallnz
Copy link
Contributor

jenkins build this please.

@opdenkamp
Copy link
Member

+1, also for gotham.1

jmarshallnz added a commit that referenced this pull request May 5, 2014
…while_in_create

Allow restart of a PVR addon while it is still creating
@jmarshallnz jmarshallnz merged commit a7bd8a4 into xbmc:master May 5, 2014
@jmarshallnz jmarshallnz removed the Gotham label May 6, 2014
jmarshallnz added a commit that referenced this pull request May 6, 2014
…while_in_create

Allow restart of a PVR addon while it is still creating
@codesnake codesnake deleted the allow_restart_of_a_pvr_addon_while_in_create branch May 8, 2014 14:46
@MartijnKaijser MartijnKaijser added this to the Helix 14.0-alpha1 milestone May 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Fix non-breaking change which fixes an issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants