diff options
author | Scott Jackson <daneren2005@gmail.com> | 2015-10-06 17:31:50 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2015-10-06 17:31:50 -0700 |
commit | e30ce23fed3b11c275ee95d2a156fd951cd2d728 (patch) | |
tree | 1f347cc88202a128f6e89a8cd6608a579ce8b232 | |
parent | 6e5a44fbb4b0a41381a7301e1f735e1c08170ecd (diff) | |
parent | 16faf222c2ab057b2486c5e50c4052dc2d081c49 (diff) | |
download | dsub-e30ce23fed3b11c275ee95d2a156fd951cd2d728.tar.gz dsub-e30ce23fed3b11c275ee95d2a156fd951cd2d728.tar.bz2 dsub-e30ce23fed3b11c275ee95d2a156fd951cd2d728.zip |
Merge remote-tracking branch 'origin/master'
-rw-r--r-- | app/app-release.apk | bin | 0 -> 4277404 bytes | |||
-rw-r--r-- | app/build.gradle | 2 | ||||
-rw-r--r-- | app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java | 2 | ||||
-rw-r--r-- | app/src/main/java/github/daneren2005/dsub/service/ChromeCastController.java | 25 | ||||
-rw-r--r-- | app/src/main/java/github/daneren2005/dsub/service/OfflineMusicService.java | 6 |
5 files changed, 19 insertions, 16 deletions
diff --git a/app/app-release.apk b/app/app-release.apk Binary files differnew file mode 100644 index 00000000..eac41b21 --- /dev/null +++ b/app/app-release.apk diff --git a/app/build.gradle b/app/build.gradle index 98571c64..12cd09fa 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -39,7 +39,7 @@ dependencies { compile 'com.android.support:mediarouter-v7:22.2.+' compile 'com.android.support:recyclerview-v7:22.2.+' compile 'com.android.support:design:22.2.+' - compile 'com.google.android.gms:play-services-cast:7.0.0' + compile 'com.google.android.gms:play-services-cast:8.1.0' compile 'com.sothree.slidinguppanel:library:3.0.0' compile 'de.hdodenhof:circleimageview:1.2.1' compile group: 'org.fourthline.cling', name: 'cling-core', version:'2.0.1' diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java index f312675f..892891d2 100644 --- a/app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java +++ b/app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java @@ -560,7 +560,7 @@ public class NowPlayingFragment extends SubsonicFragment implements OnGestureLis @Override public boolean onContextItemSelected(MenuItem menuItem, UpdateView<DownloadFile> updateView, DownloadFile downloadFile) { - if(onContextItemSelected(menuItem, downloadFile)) { + if(onContextItemSelected(menuItem, downloadFile.getSong())) { return true; } diff --git a/app/src/main/java/github/daneren2005/dsub/service/ChromeCastController.java b/app/src/main/java/github/daneren2005/dsub/service/ChromeCastController.java index a729ed4e..6006e280 100644 --- a/app/src/main/java/github/daneren2005/dsub/service/ChromeCastController.java +++ b/app/src/main/java/github/daneren2005/dsub/service/ChromeCastController.java @@ -319,21 +319,22 @@ public class ChromeCastController extends RemoteController { meta.putString(MediaMetadata.KEY_ALBUM_ARTIST, song.getArtist()); meta.putString(MediaMetadata.KEY_ALBUM_TITLE, song.getAlbum()); - String coverArt = ""; - if(proxy == null || proxy instanceof WebProxy) { - coverArt = musicService.getCoverArtUrl(downloadService, song); + if(castDevice.hasCapability(CastDevice.CAPABILITY_VIDEO_IN)) { + if (proxy == null || proxy instanceof WebProxy) { + String coverArt = musicService.getCoverArtUrl(downloadService, song); - // If proxy is going, it is a web proxy - if(proxy != null) { - coverArt = proxy.getPublicAddress(coverArt); - } + // If proxy is going, it is a web proxy + if (proxy != null) { + coverArt = proxy.getPublicAddress(coverArt); + } - meta.addImage(new WebImage(Uri.parse(coverArt))); - } else { - File coverArtFile = FileUtil.getAlbumArtFile(downloadService, song); - if(coverArtFile != null && coverArtFile.exists()) { - coverArt = proxy.getPublicAddress(coverArtFile.getPath()); meta.addImage(new WebImage(Uri.parse(coverArt))); + } else { + File coverArtFile = FileUtil.getAlbumArtFile(downloadService, song); + if (coverArtFile != null && coverArtFile.exists()) { + String coverArt = proxy.getPublicAddress(coverArtFile.getPath()); + meta.addImage(new WebImage(Uri.parse(coverArt))); + } } } } diff --git a/app/src/main/java/github/daneren2005/dsub/service/OfflineMusicService.java b/app/src/main/java/github/daneren2005/dsub/service/OfflineMusicService.java index 2146cd15..17aaf804 100644 --- a/app/src/main/java/github/daneren2005/dsub/service/OfflineMusicService.java +++ b/app/src/main/java/github/daneren2005/dsub/service/OfflineMusicService.java @@ -394,8 +394,8 @@ public class OfflineMusicService implements MusicService { Reader reader = null; BufferedReader buffer = null; + int songCount = 0; try { - int songCount = 0; reader = new FileReader(file); buffer = new BufferedReader(reader); @@ -427,7 +427,9 @@ public class OfflineMusicService implements MusicService { Util.close(reader); } - playlists.add(playlist); + if(songCount > 0) { + playlists.add(playlist); + } } } |