diff options
Diffstat (limited to 'src/github/daneren2005')
8 files changed, 17 insertions, 17 deletions
diff --git a/src/github/daneren2005/dsub/activity/SubsonicActivity.java b/src/github/daneren2005/dsub/activity/SubsonicActivity.java index 8ea9452a..6544b685 100644 --- a/src/github/daneren2005/dsub/activity/SubsonicActivity.java +++ b/src/github/daneren2005/dsub/activity/SubsonicActivity.java @@ -60,6 +60,7 @@ import java.util.List; import java.util.Locale;
import github.daneren2005.dsub.R;
+import github.daneren2005.dsub.domain.ServerInfo;
import github.daneren2005.dsub.fragments.SubsonicFragment;
import github.daneren2005.dsub.service.DownloadService;
import github.daneren2005.dsub.util.Constants;
diff --git a/src/github/daneren2005/dsub/fragments/NowPlayingFragment.java b/src/github/daneren2005/dsub/fragments/NowPlayingFragment.java index e6a325f7..ac197161 100644 --- a/src/github/daneren2005/dsub/fragments/NowPlayingFragment.java +++ b/src/github/daneren2005/dsub/fragments/NowPlayingFragment.java @@ -58,6 +58,7 @@ import github.daneren2005.dsub.activity.SubsonicFragmentActivity; import github.daneren2005.dsub.domain.Bookmark;
import github.daneren2005.dsub.domain.PlayerState;
import github.daneren2005.dsub.domain.RepeatMode;
+import github.daneren2005.dsub.domain.ServerInfo;
import github.daneren2005.dsub.service.DownloadFile;
import github.daneren2005.dsub.service.DownloadService;
import github.daneren2005.dsub.service.MusicService;
diff --git a/src/github/daneren2005/dsub/service/CachedMusicService.java b/src/github/daneren2005/dsub/service/CachedMusicService.java index 1e553ca2..59ed550c 100644 --- a/src/github/daneren2005/dsub/service/CachedMusicService.java +++ b/src/github/daneren2005/dsub/service/CachedMusicService.java @@ -30,7 +30,6 @@ import org.apache.http.HttpResponse; import android.content.Context; import android.graphics.Bitmap; -import android.util.Log; import github.daneren2005.dsub.domain.Artist; import github.daneren2005.dsub.domain.Bookmark; @@ -499,8 +498,8 @@ public class CachedMusicService implements MusicService { } @Override - public Bitmap getCoverArt(Context context, Entry entry, int size, ProgressListener progressListener) throws Exception { - return musicService.getCoverArt(context, entry, size, progressListener); + public Bitmap getCoverArt(Context context, Entry entry, int size, ProgressListener progressListener, SilentBackgroundTask task) throws Exception { + return musicService.getCoverArt(context, entry, size, progressListener, task); } @Override @@ -873,8 +872,8 @@ public class CachedMusicService implements MusicService { } @Override - public Bitmap getAvatar(String username, int size, Context context, ProgressListener progressListener) throws Exception { - return musicService.getAvatar(username, size, context, progressListener); + public Bitmap getAvatar(String username, int size, Context context, ProgressListener progressListener, SilentBackgroundTask task) throws Exception { + return musicService.getAvatar(username, size, context, progressListener, task); } @Override diff --git a/src/github/daneren2005/dsub/service/DownloadFile.java b/src/github/daneren2005/dsub/service/DownloadFile.java index 2a1306d5..04dc537a 100644 --- a/src/github/daneren2005/dsub/service/DownloadFile.java +++ b/src/github/daneren2005/dsub/service/DownloadFile.java @@ -26,10 +26,8 @@ import java.io.InputStream; import java.io.OutputStream; import android.content.Context; -import android.graphics.Bitmap; import android.net.wifi.WifiManager; import android.os.PowerManager; -import android.util.DisplayMetrics; import android.util.Log; import github.daneren2005.dsub.domain.MusicDirectory; import github.daneren2005.dsub.util.Constants; @@ -538,7 +536,7 @@ public class DownloadFile implements BufferFile { // Check if album art already exists, don't want to needlessly load into memory File albumArtFile = FileUtil.getAlbumArtFile(context, song); if(!albumArtFile.exists()) { - musicService.getCoverArt(context, song, 0, null); + musicService.getCoverArt(context, song, 0, null, null); } } } catch (Exception x) { diff --git a/src/github/daneren2005/dsub/service/DownloadService.java b/src/github/daneren2005/dsub/service/DownloadService.java index 5e8a9db6..3e3de31d 100644 --- a/src/github/daneren2005/dsub/service/DownloadService.java +++ b/src/github/daneren2005/dsub/service/DownloadService.java @@ -38,6 +38,7 @@ import github.daneren2005.dsub.domain.PlayerState; import github.daneren2005.dsub.domain.PodcastEpisode; import github.daneren2005.dsub.domain.RemoteControlState; import github.daneren2005.dsub.domain.RepeatMode; +import github.daneren2005.dsub.domain.ServerInfo; import github.daneren2005.dsub.receiver.MediaButtonIntentReceiver; import github.daneren2005.dsub.util.Notifications; import github.daneren2005.dsub.util.SilentBackgroundTask; @@ -1526,14 +1527,14 @@ public class DownloadService extends Service { playNext(); // Finished loading, delete when list is cleared - if(downloadFile.getSong() instanceof PodcastEpisode) { + if (downloadFile.getSong() instanceof PodcastEpisode) { toDelete.add(downloadFile); } clearCurrentBookmark(downloadFile.getSong(), true); } else { // If file is not completely downloaded, restart the playback from the current position. synchronized (DownloadService.this) { - if(downloadFile.isWorkDone()) { + if (downloadFile.isWorkDone()) { // Complete was called early even though file is fully buffered Log.i(TAG, "Requesting restart from " + pos + " of " + duration); reset(); diff --git a/src/github/daneren2005/dsub/service/MusicService.java b/src/github/daneren2005/dsub/service/MusicService.java index 02bfae8a..3f07e9f5 100644 --- a/src/github/daneren2005/dsub/service/MusicService.java +++ b/src/github/daneren2005/dsub/service/MusicService.java @@ -96,7 +96,7 @@ public interface MusicService { String getCoverArtUrl(Context context, MusicDirectory.Entry entry) throws Exception; - Bitmap getCoverArt(Context context, MusicDirectory.Entry entry, int size, ProgressListener progressListener) throws Exception; + Bitmap getCoverArt(Context context, MusicDirectory.Entry entry, int size, ProgressListener progressListener, SilentBackgroundTask task) throws Exception; HttpResponse getDownloadInputStream(Context context, MusicDirectory.Entry song, long offset, int maxBitrate, SilentBackgroundTask task) throws Exception; @@ -174,7 +174,7 @@ public interface MusicService { void changePassword(String username, String password, Context context, ProgressListener progressListener) throws Exception; - Bitmap getAvatar(String username, int size, Context context, ProgressListener progressListener) throws Exception; + Bitmap getAvatar(String username, int size, Context context, ProgressListener progressListener, SilentBackgroundTask task) throws Exception; int processOfflineSyncs(final Context context, final ProgressListener progressListener) throws Exception; diff --git a/src/github/daneren2005/dsub/service/OfflineMusicService.java b/src/github/daneren2005/dsub/service/OfflineMusicService.java index b62d04a1..7dd2631f 100644 --- a/src/github/daneren2005/dsub/service/OfflineMusicService.java +++ b/src/github/daneren2005/dsub/service/OfflineMusicService.java @@ -207,7 +207,7 @@ public class OfflineMusicService implements MusicService { } @Override - public Bitmap getCoverArt(Context context, MusicDirectory.Entry entry, int size, ProgressListener progressListener) throws Exception { + public Bitmap getCoverArt(Context context, MusicDirectory.Entry entry, int size, ProgressListener progressListener, SilentBackgroundTask task) throws Exception { try { return FileUtil.getAlbumArtBitmap(context, entry, size); } catch(Exception e) { @@ -761,7 +761,7 @@ public class OfflineMusicService implements MusicService { } @Override - public Bitmap getAvatar(String username, int size, Context context, ProgressListener progressListener) throws Exception { + public Bitmap getAvatar(String username, int size, Context context, ProgressListener progressListener, SilentBackgroundTask task) throws Exception { throw new OfflineException(ERRORMSG); } diff --git a/src/github/daneren2005/dsub/service/RESTMusicService.java b/src/github/daneren2005/dsub/service/RESTMusicService.java index 1f0c7e63..75923883 100644 --- a/src/github/daneren2005/dsub/service/RESTMusicService.java +++ b/src/github/daneren2005/dsub/service/RESTMusicService.java @@ -1490,10 +1490,10 @@ public class RESTMusicService implements MusicService { return new InputStreamReader(in, Constants.UTF_8); } - private HttpEntity getEntityForUrl(Context context, String url, HttpParams requestParams, List<String> parameterNames, - List<Ojbect> parameterValues, ProgressListener progressListener) throws Exception { + private HttpEntity getEntityForURL(Context context, String url, HttpParams requestParams, List<String> parameterNames, + List<Object> parameterValues, ProgressListener progressListener) throws Exception { - return getEntryForUrl(context, url, requestParams, parameterNames, parameterValues, progressListener, null); + return getEntityForURL(context, url, requestParams, parameterNames, parameterValues, progressListener, null); } private HttpEntity getEntityForURL(Context context, String url, HttpParams requestParams, List<String> parameterNames, List<Object> parameterValues, ProgressListener progressListener, SilentBackgroundTask task) throws Exception { |