diff --git a/MediaManager.Forms/MediaManager.Forms.csproj b/MediaManager.Forms/MediaManager.Forms.csproj index 92b57c28..e13ec2c1 100644 --- a/MediaManager.Forms/MediaManager.Forms.csproj +++ b/MediaManager.Forms/MediaManager.Forms.csproj @@ -34,7 +34,7 @@ - + diff --git a/MediaManager/Platforms/Android/MediaManagerImplementation.cs b/MediaManager/Platforms/Android/MediaManagerImplementation.cs index ec4374f3..31cbe074 100644 --- a/MediaManager/Platforms/Android/MediaManagerImplementation.cs +++ b/MediaManager/Platforms/Android/MediaManagerImplementation.cs @@ -290,17 +290,9 @@ public override async Task PlayPrevious() return false; } - public override async Task PlayQueueItem(IMediaItem mediaItem) + public override Task PlayQueueItem(IMediaItem mediaItem) { - await EnsureInit(); - - if (mediaItem == null || !Queue.Contains(mediaItem)) - return false; - - Queue.CurrentIndex = Queue.IndexOf(mediaItem); - - MediaController.GetTransportControls().SkipToQueueItem(Queue.IndexOf(mediaItem)); - return true; + return PlayQueueItem(Queue.IndexOf(mediaItem)); } public override async Task PlayQueueItem(int index) @@ -313,6 +305,9 @@ public override async Task PlayQueueItem(int index) Queue.CurrentIndex = index; + if (this.IsStopped()) + MediaController.GetTransportControls().Prepare(); + MediaController.GetTransportControls().SkipToQueueItem(index); return true; }