Posts: 1,126
Joined: Mar 2012
Reputation:
37
MassIV
Skilled Skinner
Posts: 1,126
Is there a visible condition i can use to know if UPNP targets are available?
I wanted to hide a button for SwitchPlayer if there were no targets.
[RELEASE] Metroid
[RELEASE] IrcChat
Posts: 17,247
Joined: Aug 2007
Reputation:
566
Hitcher
Team-Kodi Member
Posts: 17,247
Does the path contain 'upnp'?
Posts: 1,126
Joined: Mar 2012
Reputation:
37
MassIV
Skilled Skinner
Posts: 1,126
No the button is in the regular OSD so there is no reason for the path to have changed at that point. Only thing i could find in NetworkServices.cpp or UPnP.cpp was if the UPNP server was enabled or not.
CSettings::Get().GetBool("services.upnpcontroller"))
Which is fine for hiding the button if the user is not intending to use UPNP at all. But i thought i could perhaps also hide it if no targets were available.
Instead of having it return only the (default) DVDPlayer. Guessing available targets aren't known until after the button is pressed.
So never mind.
[RELEASE] Metroid
[RELEASE] IrcChat