From b98df874081009e8c7f43e06feee11db241a36dc Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Fri, 3 Jan 2014 14:49:47 +0100 Subject: [PATCH] Fixed tracks being skipped. --- .../nutomic/controldlna/upnp/RemotePlayService.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/com/github/nutomic/controldlna/upnp/RemotePlayService.java b/src/com/github/nutomic/controldlna/upnp/RemotePlayService.java index bcb14cb..df493d6 100644 --- a/src/com/github/nutomic/controldlna/upnp/RemotePlayService.java +++ b/src/com/github/nutomic/controldlna/upnp/RemotePlayService.java @@ -188,7 +188,7 @@ public class RemotePlayService extends Service implements RegistryListener { case NO_MEDIA_PRESENT: mPlaybackState = MediaItemStatus.PLAYBACK_STATE_ERROR; break; - default: + default: } } catch (Exception e) { @@ -247,6 +247,7 @@ public class RemotePlayService extends Service implements RegistryListener { */ @Override public void play(String uri, String metadata) throws RemoteException { + mPlaybackState = MediaItemStatus.PLAYBACK_STATE_BUFFERING; mUpnpService.getControlPoint().execute(new SetAVTransportURI( getService(mCurrentRenderer, "AVTransport"), uri, metadata) { @@ -264,6 +265,11 @@ public class RemotePlayService extends Service implements RegistryListener { new Play(getService(mCurrentRenderer, "AVTransport")) { + @Override + public void success(ActionInvocation invocation) { + mPlaybackState = MediaItemStatus.PLAYBACK_STATE_PLAYING; + } + @Override public void failure(ActionInvocation invocation, UpnpResponse operation, String defaultMessage) {