From a0c87a2136db0d06c9f49f02c1b36a9c07b68645 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Wed, 20 Mar 2013 18:08:08 -0700 Subject: Stopping shouldn't restart song at the beginning --- .../src/github/daneren2005/dsub/activity/DownloadActivity.java | 2 +- .../src/github/daneren2005/dsub/service/DownloadServiceImpl.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'subsonic-android/src/github') diff --git a/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java b/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java index f487b6e6..d43f13b2 100644 --- a/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java +++ b/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java @@ -788,7 +788,7 @@ public class DownloadActivity extends SubsonicTabActivity implements OnGestureLi private void start() { DownloadService service = getDownloadService(); PlayerState state = service.getPlayerState(); - if (state == PAUSED || state == COMPLETED) { + if (state == PAUSED || state == COMPLETED || state == STOPPED) { service.start(); } else if (state == STOPPED || state == IDLE) { warnIfNetworkOrStorageUnavailable(); diff --git a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java index a88b44c3..20e19f56 100644 --- a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java +++ b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java @@ -630,7 +630,7 @@ public class DownloadServiceImpl extends Service implements DownloadService { /** Plays or resumes the playback, depending on the current player state. */ public synchronized void togglePlayPause() { - if (playerState == PAUSED || playerState == COMPLETED) { + if (playerState == PAUSED || playerState == COMPLETED || playerState == STOPPED) { start(); } else if (playerState == STOPPED || playerState == IDLE) { play(); -- cgit v1.2.3