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 | |
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')
-rw-r--r-- | subsonic-android/AndroidManifest.xml | 4 | ||||
-rw-r--r-- | subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java | 8 |
2 files changed, 5 insertions, 7 deletions
diff --git a/subsonic-android/AndroidManifest.xml b/subsonic-android/AndroidManifest.xml index 8cc8eb82..8956ef8d 100644 --- a/subsonic-android/AndroidManifest.xml +++ b/subsonic-android/AndroidManifest.xml @@ -2,8 +2,8 @@ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="github.daneren2005.dsub"
android:installLocation="auto"
- android:versionCode="9"
- android:versionName="3.3.5">
+ android:versionCode="10"
+ android:versionName="3.3.5.1">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
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) { |