diff --git a/src/net/sourceforge/subsonic/androidapp/service/DownloadServiceImpl.java b/src/net/sourceforge/subsonic/androidapp/service/DownloadServiceImpl.java index c54df363..a8fb739f 100644 --- a/src/net/sourceforge/subsonic/androidapp/service/DownloadServiceImpl.java +++ b/src/net/sourceforge/subsonic/androidapp/service/DownloadServiceImpl.java @@ -800,6 +800,7 @@ public class DownloadServiceImpl extends Service implements DownloadService { remoteControlClientCompat .editMetadata(true) .putString(MediaMetadataRetriever.METADATA_KEY_TITLE, title) + .putString(MediaMetadataRetriever.METADATA_KEY_ARTIST, currentSong.getArtist()) .putString(MediaMetadataRetriever.METADATA_KEY_ALBUM, album) .putLong(MediaMetadataRetriever.METADATA_KEY_DURATION, duration) .putBitmap(RemoteControlClientCompat.MetadataEditorCompat.METADATA_KEY_ARTWORK, bitmap) @@ -875,7 +876,7 @@ public class DownloadServiceImpl extends Service implements DownloadService { mp.start(); setPlayerState(STARTED); } else { - setPlayerState(PAUSED); + setPlayerState(STOPPED); } lifecycleSupport.serializeDownloadQueue(); diff --git a/src/net/sourceforge/subsonic/androidapp/service/DownloadServiceLifecycleSupport.java b/src/net/sourceforge/subsonic/androidapp/service/DownloadServiceLifecycleSupport.java index aec39245..3ca60a8f 100644 --- a/src/net/sourceforge/subsonic/androidapp/service/DownloadServiceLifecycleSupport.java +++ b/src/net/sourceforge/subsonic/androidapp/service/DownloadServiceLifecycleSupport.java @@ -200,6 +200,8 @@ public class DownloadServiceLifecycleSupport { // Work-around: Serialize again, as the restore() method creates a serialization without current playing info. serializeDownloadQueue(); + + downloadService.setPlayerState(PlayerState.STOPPED); } private void handleKeyEvent(KeyEvent event) { @@ -209,6 +211,8 @@ public class DownloadServiceLifecycleSupport { switch (event.getKeyCode()) { case KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE: + case KeyEvent.KEYCODE_MEDIA_PLAY: + case KeyEvent.KEYCODE_MEDIA_PAUSE: case KeyEvent.KEYCODE_HEADSETHOOK: downloadService.togglePlayPause(); break;