aboutsummaryrefslogtreecommitdiff
path: root/src/github
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2015-04-01 08:21:30 -0700
committerScott Jackson <daneren2005@gmail.com>2015-04-01 08:21:30 -0700
commitec3bbec302f66afe3b3ed4af5bed7516ef7c57c4 (patch)
tree7fa70ba2aee7aaeacaab118540d5718f6b3c24f2 /src/github
parentffa937ab0d5e9b0935de1e7b76b2ed3b3a395a64 (diff)
downloaddsub-ec3bbec302f66afe3b3ed4af5bed7516ef7c57c4.tar.gz
dsub-ec3bbec302f66afe3b3ed4af5bed7516ef7c57c4.tar.bz2
dsub-ec3bbec302f66afe3b3ed4af5bed7516ef7c57c4.zip
Fix getting a error sometimes when skipping to the next song while another one is finishing preparing
Diffstat (limited to 'src/github')
-rw-r--r--src/github/daneren2005/dsub/service/DownloadService.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/github/daneren2005/dsub/service/DownloadService.java b/src/github/daneren2005/dsub/service/DownloadService.java
index d4d97fd5..c953823b 100644
--- a/src/github/daneren2005/dsub/service/DownloadService.java
+++ b/src/github/daneren2005/dsub/service/DownloadService.java
@@ -1015,6 +1015,8 @@ public class DownloadService extends Service {
if(size() == 1) {
seekTo(getPlayerPosition() + FAST_FORWARD);
return;
+ } else if(playerState == PREPARING || playerState == PREPARED) {
+ return;
}
// Delete podcast if fully listened to
@@ -1563,6 +1565,7 @@ public class DownloadService extends Service {
subtractPosition = 0;
mediaPlayer.setOnCompletionListener(null);
mediaPlayer.setOnPreparedListener(null);
+ mediaPlayer.setOnErrorListener(null);
mediaPlayer.reset();
setPlayerState(IDLE);
try {