diff options
author | Tom Hennen <TomHennen@users.noreply.github.com> | 2016-05-08 16:30:29 -0400 |
---|---|---|
committer | Tom Hennen <TomHennen@users.noreply.github.com> | 2016-05-08 16:30:29 -0400 |
commit | 50190e77eee13d44ab3146ce1755605251606b8b (patch) | |
tree | 46e8bc5281aeaf211af2ea22fd8d1304dc147d13 /core | |
parent | 4a7fc1169d376dbcafc574c8e65fb6e054315791 (diff) | |
parent | bd8e94b3bc5a8dcf32c13968b954ca6b3c3376e7 (diff) | |
download | AntennaPod-50190e77eee13d44ab3146ce1755605251606b8b.zip |
Merge pull request #1928 from AntennaPod/develop
Get casting fix in 1.6.0
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java | 2 | ||||
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/service/playback/RemotePSMP.java | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java index b66826c0c..e6d41879c 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java @@ -701,7 +701,7 @@ public class PlaybackService extends Service { boolean isInQueue = false; FeedItem nextItem = null; - if (playable instanceof FeedMedia) { + if (playable instanceof FeedMedia && ((FeedMedia) playable).getItem() != null) { FeedMedia media = (FeedMedia) playable; FeedItem item = media.getItem(); diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/playback/RemotePSMP.java b/core/src/main/java/de/danoeh/antennapod/core/service/playback/RemotePSMP.java index 287bb1776..4262b8a70 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/playback/RemotePSMP.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/playback/RemotePSMP.java @@ -264,6 +264,11 @@ public class RemotePSMP extends PlaybackServiceMediaPlayer { if (!CastUtils.isCastable(playable)) { Log.d(TAG, "media provided is not compatible with cast device"); callback.onMediaPlayerInfo(CAST_ERROR_PRIORITY_HIGH, R.string.cast_not_castable); + try { + playable.loadMetadata(); + } catch (Playable.PlayableException e) { + Log.e(TAG, "Unable to load metadata of playable", e); + } callback.endPlayback(playable, startWhenPrepared, true, false); return; } |