Skip to content
This repository has been archived by the owner on Apr 15, 2023. It is now read-only.

Commit

Permalink
[AirPlay] - only stop media if it was started via AirPlay. We get the…
Browse files Browse the repository at this point in the history
… stop request when stopping picture streaming aswell and don't won't to stop background music player here.
  • Loading branch information
Memphiz committed Feb 4, 2012
1 parent 5c8c939 commit 0de4a57
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions xbmc/network/AirPlayServer.cpp
Expand Up @@ -33,6 +33,7 @@
#include "Application.h"
#include "utils/md5.h"
#include "utils/Variant.h"
#include "guilib/GUIWindowManager.h"

#ifdef TARGET_WINDOWS
#define close closesocket
Expand Down Expand Up @@ -823,8 +824,15 @@ int CAirPlayServer::CTCPClient::ProcessRequest( CStdString& responseHeader,
}
else
{
g_application.getApplicationMessenger().MediaStop();
CAirPlayServer::m_isPlaying--;
if (IsPlaying()) //only stop player if we started him
{
g_application.getApplicationMessenger().MediaStop();
CAirPlayServer::m_isPlaying--;
}
else //if we are not playing and get the stop request - we just wanna stop picture streaming
{
g_windowManager.PreviousWindow();
}
ComposeReverseEvent(reverseHeader, reverseBody, sessionId, EVENT_STOPPED);
}
}
Expand Down

0 comments on commit 0de4a57

Please sign in to comment.