Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #4493 from Memphiz/airplaypicvolume

[airplay] - fix unwanted volume restore
  • Loading branch information...
commit 5cd22108ee13d013579f5f700f536d6dcbd0c282 2 parents 889c88f + 3833913
@jmarshallnz jmarshallnz authored
View
8 xbmc/network/AirPlayServer.cpp
@@ -160,7 +160,13 @@ void CAirPlayServer::Announce(AnnouncementFlag flag, const char *sender, const c
{
if (strcmp(message, "OnStop") == 0)
{
- restoreVolume();
+ bool shouldRestoreVolume = true;
+ if (data.isMember("player") && data["player"].isMember("playerid"))
+ shouldRestoreVolume = (data["player"]["playerid"] != PLAYLIST_PICTURE);
+
+ if (shouldRestoreVolume)
+ restoreVolume();
+
ServerInstance->AnnounceToClients(EVENT_STOPPED);
}
else if (strcmp(message, "OnPlay") == 0)
View
4 xbmc/network/AirTunesServer.cpp
@@ -140,10 +140,6 @@ void CAirTunesServer::Announce(AnnouncementFlag flag, const char *sender, const
{
if ( (flag & Player) && strcmp(sender, "xbmc") == 0)
{
-#ifdef HAS_AIRPLAY
- if (strcmp(message, "OnStop") == 0)
- CAirPlayServer::restoreVolume();
-#endif
if (strcmp(message, "OnPlay") == 0 && m_streamStarted)
{
RefreshMetadata();
Please sign in to comment.
Something went wrong with that request. Please try again.