Skip to content

Commit

Permalink
Merge pull request #4493 from Memphiz/airplaypicvolume
Browse files Browse the repository at this point in the history
[airplay] - fix unwanted volume restore
  • Loading branch information
jmarshallnz authored and t-nelson committed Apr 3, 2014
1 parent 5e9c7c5 commit 281d67d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 7 additions & 1 deletion xbmc/network/AirPlayServer.cpp
Expand Up @@ -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)
Expand Down
4 changes: 0 additions & 4 deletions xbmc/network/AirTunesServer.cpp
Expand Up @@ -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();
Expand Down

0 comments on commit 281d67d

Please sign in to comment.