diff options
Diffstat (limited to 'src/github')
6 files changed, 15 insertions, 42 deletions
diff --git a/src/github/daneren2005/dsub/fragments/SearchFragment.java b/src/github/daneren2005/dsub/fragments/SearchFragment.java index f73989fb..b7ef204f 100644 --- a/src/github/daneren2005/dsub/fragments/SearchFragment.java +++ b/src/github/daneren2005/dsub/fragments/SearchFragment.java @@ -13,7 +13,6 @@ import android.view.Menu; import android.view.MenuInflater;
import android.view.View;
import android.view.MenuItem;
-import android.widget.AbsListView;
import android.widget.AdapterView;
import android.widget.ListAdapter;
import android.widget.ListView;
@@ -325,7 +324,7 @@ public class SearchFragment extends SubsonicFragment { if (!append) {
downloadService.clear();
}
- downloadService.download(Arrays.asList(song), save, false, playNext, false);
+ downloadService.download(Arrays.asList(song), save, false, playNext);
if (autoplay) {
downloadService.play(downloadService.size() - 1);
}
diff --git a/src/github/daneren2005/dsub/fragments/SelectBookmarkFragment.java b/src/github/daneren2005/dsub/fragments/SelectBookmarkFragment.java index c26429ce..46251073 100644 --- a/src/github/daneren2005/dsub/fragments/SelectBookmarkFragment.java +++ b/src/github/daneren2005/dsub/fragments/SelectBookmarkFragment.java @@ -18,8 +18,6 @@ */ package github.daneren2005.dsub.fragments; -import android.content.DialogInterface; -import android.util.Log; import android.view.ContextMenu; import android.view.MenuInflater; import android.view.MenuItem; @@ -30,18 +28,12 @@ import github.daneren2005.dsub.R; import github.daneren2005.dsub.activity.DownloadActivity; import github.daneren2005.dsub.domain.Bookmark; import github.daneren2005.dsub.domain.MusicDirectory; -import github.daneren2005.dsub.service.DownloadFile; import github.daneren2005.dsub.service.DownloadService; import github.daneren2005.dsub.service.MusicService; -import github.daneren2005.dsub.service.MusicServiceFactory; -import github.daneren2005.dsub.service.OfflineException; -import github.daneren2005.dsub.service.ServerTooOldException; -import github.daneren2005.dsub.util.LoadingTask; import github.daneren2005.dsub.util.ProgressListener; import github.daneren2005.dsub.util.SilentBackgroundTask; import github.daneren2005.dsub.util.Util; import github.daneren2005.dsub.view.BookmarkAdapter; -import github.daneren2005.dsub.view.SongView; import java.text.Format; import java.text.SimpleDateFormat; @@ -114,7 +106,7 @@ public class SelectBookmarkFragment extends SelectListFragment<MusicDirectory.En @Override protected Void doInBackground() throws Throwable { downloadService.clear(); - downloadService.download(Arrays.asList(bookmark), false, true, false, false, 0, bookmark.getBookmark().getPosition()); + downloadService.download(Arrays.asList(bookmark), false, true, false, 0, bookmark.getBookmark().getPosition()); return null; } diff --git a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java index d441267d..4d273f6c 100644 --- a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java +++ b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java @@ -771,7 +771,7 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter }
private void playNow(final boolean shuffle, final boolean append, final boolean playNext) {
if(getSelectedSongs().size() > 0) {
- download(append, false, !append, playNext, shuffle);
+ download(append, false, !append, playNext);
selectAll(false, false);
}
else {
@@ -795,7 +795,7 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter downloadRecursively(id, false, append, !append, shuffle, false);
} else {
selectAll(true, false);
- download(append, false, !append, false, shuffle);
+ download(append, false, !append, false);
selectAll(false, false);
}
}
@@ -848,7 +848,7 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter return indexes;
}
- private void download(final boolean append, final boolean save, final boolean autoplay, final boolean playNext, final boolean shuffle) {
+ private void download(final boolean append, final boolean save, final boolean autoplay, final boolean playNext) {
if (getDownloadService() == null) {
return;
}
@@ -857,7 +857,7 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter warnIfNetworkOrStorageUnavailable();
// Conditions for using play now button
- if(!append && !save && autoplay && !playNext && !shuffle) {
+ if(!append && !save && autoplay && !playNext) {
// Call playNow which goes through and tries to use bookmark information
playNow(songs, playlistName, playlistId);
return;
@@ -870,7 +870,7 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter getDownloadService().clear();
}
- getDownloadService().download(songs, save, autoplay, playNext, shuffle);
+ getDownloadService().download(songs, save, autoplay, playNext);
if (playlistName != null) {
getDownloadService().setSuggestedPlaylistName(playlistName, playlistId);
} else {
diff --git a/src/github/daneren2005/dsub/fragments/SelectPlaylistFragment.java b/src/github/daneren2005/dsub/fragments/SelectPlaylistFragment.java index caf9079f..741ed8a5 100644 --- a/src/github/daneren2005/dsub/fragments/SelectPlaylistFragment.java +++ b/src/github/daneren2005/dsub/fragments/SelectPlaylistFragment.java @@ -98,17 +98,6 @@ public class SelectPlaylistFragment extends SelectListFragment<Playlist> { replaceFragment(fragment);
break;
- case R.id.playlist_menu_play_shuffled:
- fragment = new SelectDirectoryFragment();
- args = new Bundle();
- args.putString(Constants.INTENT_EXTRA_NAME_PLAYLIST_ID, playlist.getId());
- args.putString(Constants.INTENT_EXTRA_NAME_PLAYLIST_NAME, playlist.getName());
- args.putBoolean(Constants.INTENT_EXTRA_NAME_SHUFFLE, true);
- args.putBoolean(Constants.INTENT_EXTRA_NAME_AUTOPLAY, true);
- fragment.setArguments(args);
-
- replaceFragment(fragment);
- break;
case R.id.playlist_menu_delete:
deletePlaylist(playlist);
break;
diff --git a/src/github/daneren2005/dsub/fragments/SubsonicFragment.java b/src/github/daneren2005/dsub/fragments/SubsonicFragment.java index 5cab2497..1a5cd5a7 100644 --- a/src/github/daneren2005/dsub/fragments/SubsonicFragment.java +++ b/src/github/daneren2005/dsub/fragments/SubsonicFragment.java @@ -376,10 +376,6 @@ public class SubsonicFragment extends Fragment implements SwipeRefreshLayout.OnR artistOverride = true;
downloadRecursively(entry.getId(), false, false, true, false, false);
break;
- case R.id.album_menu_play_shuffled:
- artistOverride = true;
- downloadRecursively(entry.getId(), false, false, true, true, false);
- break;
case R.id.album_menu_play_next:
artistOverride = true;
downloadRecursively(entry.getId(), false, true, false, false, false, true);
@@ -415,10 +411,10 @@ public class SubsonicFragment extends Fragment implements SwipeRefreshLayout.OnR playNow(songs);
break;
case R.id.song_menu_play_next:
- getDownloadService().download(songs, false, false, true, false);
+ getDownloadService().download(songs, false, false, true);
break;
case R.id.song_menu_play_last:
- getDownloadService().download(songs, false, false, false, false);
+ getDownloadService().download(songs, false, false, false);
break;
case R.id.song_menu_download:
getDownloadService().downloadBackground(songs, false);
@@ -893,7 +889,7 @@ public class SubsonicFragment extends Fragment implements SwipeRefreshLayout.OnR downloadService.clear();
}
if(!background) {
- downloadService.download(songs, save, autoplay, playNext, false);
+ downloadService.download(songs, save, autoplay, playNext);
if(!append) {
transition = true;
}
@@ -1557,7 +1553,7 @@ public class SubsonicFragment extends Fragment implements SwipeRefreshLayout.OnR }
downloadService.clear();
- downloadService.download(entries, false, true, true, false, entries.indexOf(song), position);
+ downloadService.download(entries, false, true, true, entries.indexOf(song), position);
downloadService.setSuggestedPlaylistName(playlistName, playlistId);
return null;
diff --git a/src/github/daneren2005/dsub/service/DownloadService.java b/src/github/daneren2005/dsub/service/DownloadService.java index 2b727dfb..643b2845 100644 --- a/src/github/daneren2005/dsub/service/DownloadService.java +++ b/src/github/daneren2005/dsub/service/DownloadService.java @@ -53,10 +53,8 @@ import github.daneren2005.dsub.view.UpdateView; import github.daneren2005.serverproxy.BufferProxy; import java.io.File; -import java.io.IOError; import java.io.IOException; import java.util.ArrayList; -import java.util.Collections; import java.util.Iterator; import java.util.List; import java.util.Random; @@ -71,7 +69,6 @@ import android.content.SharedPreferences; import android.media.AudioManager; import android.media.MediaPlayer; import android.media.audiofx.AudioEffect; -import android.media.audiofx.Equalizer; import android.os.Build; import android.os.Handler; import android.os.IBinder; @@ -305,10 +302,10 @@ public class DownloadService extends Service { return binder; } - public synchronized void download(List<MusicDirectory.Entry> songs, boolean save, boolean autoplay, boolean playNext, boolean shuffle) { - download(songs, save, autoplay, playNext, shuffle, 0, 0); + public synchronized void download(List<MusicDirectory.Entry> songs, boolean save, boolean autoplay, boolean playNext) { + download(songs, save, autoplay, playNext, 0, 0); } - public synchronized void download(List<MusicDirectory.Entry> songs, boolean save, boolean autoplay, boolean playNext, boolean shuffle, int start, int position) { + public synchronized void download(List<MusicDirectory.Entry> songs, boolean save, boolean autoplay, boolean playNext, int start, int position) { setShuffleRemote(false); int offset = 1; @@ -397,7 +394,7 @@ public class DownloadService extends Service { removePlayed = true; } boolean startShufflePlay = prefs.getBoolean(Constants.PREFERENCES_KEY_SHUFFLE_REMOTE, false); - download(songs, false, false, false, false); + download(songs, false, false, false); if(startShufflePlay) { shuffleRemote = true; SharedPreferences.Editor editor = prefs.edit(); |