diff options
author | Scott Jackson <daneren2005@gmail.com> | 2012-09-08 21:21:17 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2012-09-08 21:21:17 -0700 |
commit | 1f330ce8e20e55937a012176d748867fd7e36320 (patch) | |
tree | 3ac84d87ff2dadb9d040788a4726d75374695e35 /subsonic-android/src/github | |
parent | 00646f4aacd09c24d13170fe78bb144f1a98c4f6 (diff) | |
download | dsub-1f330ce8e20e55937a012176d748867fd7e36320.tar.gz dsub-1f330ce8e20e55937a012176d748867fd7e36320.tar.bz2 dsub-1f330ce8e20e55937a012176d748867fd7e36320.zip |
Fix for Offline playing error
Diffstat (limited to 'subsonic-android/src/github')
-rw-r--r-- | subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java index b7f6813e..bec6c727 100644 --- a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java +++ b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java @@ -458,14 +458,14 @@ public class DownloadServiceImpl extends Service implements DownloadService { } if (mRemoteControlClient != null) { - MusicDirectory.Entry currentSong = currentPlaying == null ? null: currentPlaying.getSong(); + MusicDirectory.Entry currentSong = ((currentPlaying == null) ? null: currentPlaying.getSong()); // Update the remote controls mRemoteControlClient.editMetadata(true) .putString(MediaMetadataRetriever.METADATA_KEY_ARTIST, currentSong == null ? null : currentSong.getArtist()) .putString(MediaMetadataRetriever.METADATA_KEY_ALBUM, currentSong == null ? null : currentSong.getAlbum()) .putString(MediaMetadataRetriever.METADATA_KEY_TITLE, currentSong == null ? null : currentSong.getTitle()) - .putLong(MediaMetadataRetriever.METADATA_KEY_DURATION, currentSong == null ? 0 : currentSong.getDuration()) - .apply(); + .putLong(MediaMetadataRetriever.METADATA_KEY_DURATION, (currentSong == null) ? 0 : ((currentSong.getDuration() == null) ? 0 : currentSong.getDuration())) + .apply(); if (currentSong == null) { mRemoteControlClient.editMetadata(true) .putBitmap(RemoteControlClient.MetadataEditor.BITMAP_KEY_ARTWORK, null) @@ -702,10 +702,8 @@ public class DownloadServiceImpl extends Service implements DownloadService { if (show) { Util.showPlayingNotification(this, this, handler, currentPlaying.getSong()); - Log.d(TAG, "Showing"); } else if (hide) { Util.hidePlayingNotification(this, this, handler); - Log.d(TAG, "Hiding"); } if (playerState == STARTED) { |