mirror of
https://github.com/AntennaPod/AntennaPod.git
synced 2024-12-26 08:44:13 +01:00
Fixed: application crash when trying to play media that is already
playing
This commit is contained in:
parent
853556b0cf
commit
2ba8847610
@ -360,6 +360,7 @@ public class FeedManager {
|
||||
PodDBAdapter adapter = new PodDBAdapter(context);
|
||||
adapter.open();
|
||||
long result = adapter.setMedia(media);
|
||||
adapter.close();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -171,8 +171,11 @@ public class PlaybackService extends Service {
|
||||
stopSelf();
|
||||
}
|
||||
|
||||
} else if (media != null && status != PlayerStatus.PLAYING) {
|
||||
play();
|
||||
} else if (media != null) {
|
||||
if (status == PlayerStatus.PAUSED) {
|
||||
play();
|
||||
}
|
||||
|
||||
} else {
|
||||
Log.w(TAG, "Something went wrong. Shutting down...");
|
||||
stopSelf();
|
||||
@ -424,7 +427,7 @@ public class PlaybackService extends Service {
|
||||
public boolean isPlayingVideo() {
|
||||
return playingVideo;
|
||||
}
|
||||
|
||||
|
||||
public boolean isShouldStream() {
|
||||
return shouldStream;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user