diff --git a/res/drawable-hdpi/ic_menu_shuffle_selected.png b/res/drawable-hdpi/ic_menu_shuffle_selected.png deleted file mode 100644 index e2ace6341..000000000 Binary files a/res/drawable-hdpi/ic_menu_shuffle_selected.png and /dev/null differ diff --git a/res/drawable-mdpi/ic_menu_shuffle_selected.png b/res/drawable-mdpi/ic_menu_shuffle_selected.png deleted file mode 100644 index c8c01fff4..000000000 Binary files a/res/drawable-mdpi/ic_menu_shuffle_selected.png and /dev/null differ diff --git a/res/drawable-xhdpi/ic_menu_shuffle_selected.png b/res/drawable-xhdpi/ic_menu_shuffle_selected.png deleted file mode 100644 index 037190611..000000000 Binary files a/res/drawable-xhdpi/ic_menu_shuffle_selected.png and /dev/null differ diff --git a/res/drawable-xxhdpi/ic_menu_shuffle_selected.png b/res/drawable-xxhdpi/ic_menu_shuffle_selected.png deleted file mode 100644 index 16cfea542..000000000 Binary files a/res/drawable-xxhdpi/ic_menu_shuffle_selected.png and /dev/null differ diff --git a/res/layout/download_media_buttons.xml b/res/layout/download_media_buttons.xml index 1e6946629..1affb164c 100644 --- a/res/layout/download_media_buttons.xml +++ b/res/layout/download_media_buttons.xml @@ -55,8 +55,8 @@ diff --git a/res/menu/nowplaying.xml b/res/menu/nowplaying.xml index 3f49ae192..60255692a 100644 --- a/res/menu/nowplaying.xml +++ b/res/menu/nowplaying.xml @@ -3,18 +3,18 @@ xmlns:compat="http://schemas.android.com/apk/res-auto" android:checkableBehavior="all"> + + - - + + - - + + + + + + + + + \ No newline at end of file diff --git a/res/menu/select_song.xml b/res/menu/select_song.xml index c1628d2e6..07fd57a78 100644 --- a/res/menu/select_song.xml +++ b/res/menu/select_song.xml @@ -7,6 +7,12 @@ android:title="@string/menu.play" compat:showAsAction="always|withText"/> + + diff --git a/res/menu/select_song_offline.xml b/res/menu/select_song_offline.xml index 5ff42d12c..c45405fb3 100644 --- a/res/menu/select_song_offline.xml +++ b/res/menu/select_song_offline.xml @@ -7,6 +7,12 @@ android:title="@string/menu.play" compat:showAsAction="always|withText"/> + + diff --git a/res/values/strings.xml b/res/values/strings.xml index 71b6e08ec..33a409814 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -212,8 +212,6 @@ Current: %1$s \nEstimated Size: %2$s Failed to load - Shuffle on - Shuffle off New podcasts available New songs in playlists diff --git a/res/xml/changelog.xml b/res/xml/changelog.xml index 46fef498b..5c8bb0248 100644 --- a/res/xml/changelog.xml +++ b/res/xml/changelog.xml @@ -1,7 +1,6 @@ - Changed from shuffle option to persistent shuffle toggle Improve automatic bookmark logic Tasker: Toggle online/offline Tasker: Set start/end year + genre for shuffle diff --git a/src/github/daneren2005/dsub/fragments/NowPlayingFragment.java b/src/github/daneren2005/dsub/fragments/NowPlayingFragment.java index 8fef07a8c..b6daea989 100644 --- a/src/github/daneren2005/dsub/fragments/NowPlayingFragment.java +++ b/src/github/daneren2005/dsub/fragments/NowPlayingFragment.java @@ -111,7 +111,7 @@ public class NowPlayingFragment extends SubsonicFragment implements OnGestureLis private View stopButton; private View startButton; private ImageButton repeatButton; - private ImageButton shuffleButton; + private View toggleListButton; private ImageButton starButton; private ImageButton bookmarkButton; private ImageButton rateBadButton; @@ -187,7 +187,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle bu bookmarkButton = (ImageButton) rootView.findViewById(R.id.download_bookmark); rateBadButton = (ImageButton) rootView.findViewById(R.id.download_rating_bad); rateGoodButton = (ImageButton) rootView.findViewById(R.id.download_rating_good); - shuffleButton = (ImageButton) rootView.findViewById(R.id.download_shuffle); + toggleListButton =rootView.findViewById(R.id.download_toggle_list); starButton = (ImageButton)rootView.findViewById(R.id.download_star); if(Util.getPreferences(context).getBoolean(Constants.PREFERENCES_KEY_MENU_STAR, true)) { @@ -350,7 +350,7 @@ protected void done(Void result) { public void onClick(View view) { RepeatMode repeatMode = getDownloadService().getRepeatMode().next(); getDownloadService().setRepeatMode(repeatMode); - updateButtons(); + onDownloadListChanged(); switch (repeatMode) { case OFF: Util.toast(context, R.string.download_repeat_off); @@ -453,18 +453,11 @@ public void onClick(View view) { } }); - shuffleButton.setOnClickListener(new View.OnClickListener() { + toggleListButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { - DownloadService downloadService = getDownloadService(); - downloadService.setShuffleMode(!downloadService.isShuffleMode()); - updateButtons(); + toggleFullscreenAlbumArt(); setControlsVisible(true); - if(downloadService.isShuffleMode()) { - Util.toast(context, R.string.download_shuffle_on); - } else { - Util.toast(context, R.string.download_shuffle_off); - } } }); @@ -551,7 +544,7 @@ public void remove(int which) { if (downloadService != null && context.getIntent().getBooleanExtra(Constants.INTENT_EXTRA_NAME_SHUFFLE, false)) { context.getIntent().removeExtra(Constants.INTENT_EXTRA_NAME_SHUFFLE); warnIfNetworkOrStorageUnavailable(); - downloadService.setShuffleRemote(true); + downloadService.setShufflePlayEnabled(true); } if(Build.MODEL.equals("Nexus 4") || Build.MODEL.equals("GT-I9100")) { @@ -741,7 +734,7 @@ public void onClick(DialogInterface dialog, int which) { new SilentBackgroundTask(context) { @Override protected Void doInBackground() throws Throwable { - getDownloadService().setShuffleRemote(false); + getDownloadService().setShufflePlayEnabled(false); getDownloadService().clear(); return null; } @@ -772,9 +765,19 @@ protected void done(Void result) { } context.supportInvalidateOptionsMenu(); return true; - case R.id.menu_toggle_list: - toggleFullscreenAlbumArt(); - setControlsVisible(true); + case R.id.menu_shuffle: + new SilentBackgroundTask(context) { + @Override + protected Void doInBackground() throws Throwable { + getDownloadService().shuffle(); + return null; + } + + @Override + protected void done(Void result) { + Util.toast(context, R.string.download_menu_shuffle_notification); + } + }.execute(); return true; case R.id.menu_save_playlist: List entries = new LinkedList(); @@ -946,39 +949,6 @@ private void updateButtons() { rateBadButton.setVisibility(View.VISIBLE); rateGoodButton.setVisibility(View.VISIBLE); } - - DownloadService downloadService = getDownloadService(); - if(downloadService == null) { - return; - } - - switch (downloadService.getRepeatMode()) { - case OFF: - if("light".equals(SubsonicActivity.getThemeName()) | "light_fullscreen".equals(SubsonicActivity.getThemeName())) { - repeatButton.setImageResource(R.drawable.media_repeat_off_light); - } else { - repeatButton.setImageResource(R.drawable.media_repeat_off); - } - break; - case ALL: - repeatButton.setImageResource(R.drawable.media_repeat_all); - break; - case SINGLE: - repeatButton.setImageResource(R.drawable.media_repeat_single); - break; - default: - break; - } - - if(downloadService.isShuffleMode()) { - shuffleButton.setImageResource(R.drawable.ic_menu_shuffle_selected); - } else { - if("light".equals(SubsonicActivity.getThemeName())) { - shuffleButton.setImageResource(R.drawable.ic_menu_shuffle_light); - } else { - shuffleButton.setImageResource(R.drawable.ic_menu_shuffle_dark); - } - } } // Scroll to current playing/downloading. @@ -1143,7 +1113,7 @@ protected void done(Void result) { List list; list = downloadService.getSongs(); - if(downloadService.isShuffleRemote()) { + if(downloadService.isShufflePlayEnabled()) { emptyTextView.setText(R.string.download_shuffle_loading); } else { @@ -1162,6 +1132,24 @@ protected void done(Void result) { emptyTextView.setVisibility(list.isEmpty() ? View.VISIBLE : View.GONE); currentRevision = downloadService.getDownloadListUpdateRevision(); + + switch (downloadService.getRepeatMode()) { + case OFF: + if("light".equals(SubsonicActivity.getThemeName()) | "light_fullscreen".equals(SubsonicActivity.getThemeName())) { + repeatButton.setImageResource(R.drawable.media_repeat_off_light); + } else { + repeatButton.setImageResource(R.drawable.media_repeat_off); + } + break; + case ALL: + repeatButton.setImageResource(R.drawable.media_repeat_all); + break; + case SINGLE: + repeatButton.setImageResource(R.drawable.media_repeat_single); + break; + default: + break; + } if(scrollWhenLoaded) { scrollToCurrent(); diff --git a/src/github/daneren2005/dsub/fragments/SearchFragment.java b/src/github/daneren2005/dsub/fragments/SearchFragment.java index b7ef204f7..f73989fb0 100644 --- a/src/github/daneren2005/dsub/fragments/SearchFragment.java +++ b/src/github/daneren2005/dsub/fragments/SearchFragment.java @@ -13,6 +13,7 @@ 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; @@ -324,7 +325,7 @@ private void onSongSelected(MusicDirectory.Entry song, boolean save, boolean app if (!append) { downloadService.clear(); } - downloadService.download(Arrays.asList(song), save, false, playNext); + downloadService.download(Arrays.asList(song), save, false, playNext, false); 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 462510739..c26429ce7 100644 --- a/src/github/daneren2005/dsub/fragments/SelectBookmarkFragment.java +++ b/src/github/daneren2005/dsub/fragments/SelectBookmarkFragment.java @@ -18,6 +18,8 @@ */ 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; @@ -28,12 +30,18 @@ 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; @@ -106,7 +114,7 @@ public void onItemClick(AdapterView parent, View view, int position, long id) @Override protected Void doInBackground() throws Throwable { downloadService.clear(); - downloadService.download(Arrays.asList(bookmark), false, true, false, 0, bookmark.getBookmark().getPosition()); + downloadService.download(Arrays.asList(bookmark), false, true, false, 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 677664b5f..a8b4ab387 100644 --- a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java +++ b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java @@ -780,7 +780,7 @@ private void playNow(final boolean shuffle, final boolean append) { } private void playNow(final boolean shuffle, final boolean append, final boolean playNext) { if(getSelectedSongs().size() > 0) { - download(append, false, !append, playNext); + download(append, false, !append, playNext, shuffle); selectAll(false, false); } else { @@ -804,7 +804,7 @@ private void playAll(final boolean shuffle, final boolean append) { downloadRecursively(id, false, append, !append, shuffle, false); } else { selectAll(true, false); - download(append, false, !append, false); + download(append, false, !append, false, shuffle); selectAll(false, false); } } @@ -857,7 +857,7 @@ private List getSelectedIndexes() { return indexes; } - private void download(final boolean append, final boolean save, final boolean autoplay, final boolean playNext) { + private void download(final boolean append, final boolean save, final boolean autoplay, final boolean playNext, final boolean shuffle) { if (getDownloadService() == null) { return; } @@ -866,7 +866,7 @@ private void download(final boolean append, final boolean save, final boolean au warnIfNetworkOrStorageUnavailable(); // Conditions for using play now button - if(!append && !save && autoplay && !playNext) { + if(!append && !save && autoplay && !playNext && !shuffle) { // Call playNow which goes through and tries to use bookmark information playNow(songs, playlistName, playlistId); return; @@ -879,7 +879,7 @@ protected Void doInBackground() throws Throwable { getDownloadService().clear(); } - getDownloadService().download(songs, save, autoplay, playNext); + getDownloadService().download(songs, save, autoplay, playNext, shuffle); 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 741ed8a53..caf9079fa 100644 --- a/src/github/daneren2005/dsub/fragments/SelectPlaylistFragment.java +++ b/src/github/daneren2005/dsub/fragments/SelectPlaylistFragment.java @@ -96,6 +96,17 @@ public boolean onContextItemSelected(MenuItem menuItem) { args.putBoolean(Constants.INTENT_EXTRA_NAME_AUTOPLAY, true); fragment.setArguments(args); + 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: diff --git a/src/github/daneren2005/dsub/fragments/SubsonicFragment.java b/src/github/daneren2005/dsub/fragments/SubsonicFragment.java index 1a5cd5a71..5cab24974 100644 --- a/src/github/daneren2005/dsub/fragments/SubsonicFragment.java +++ b/src/github/daneren2005/dsub/fragments/SubsonicFragment.java @@ -376,6 +376,10 @@ public boolean onContextItemSelected(MenuItem menuItem, Object selectedItem) { 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); @@ -411,10 +415,10 @@ public boolean onContextItemSelected(MenuItem menuItem, Object selectedItem) { playNow(songs); break; case R.id.song_menu_play_next: - getDownloadService().download(songs, false, false, true); + getDownloadService().download(songs, false, false, true, false); break; case R.id.song_menu_play_last: - getDownloadService().download(songs, false, false, false); + getDownloadService().download(songs, false, false, false, false); break; case R.id.song_menu_download: getDownloadService().downloadBackground(songs, false); @@ -889,7 +893,7 @@ else if(isDirectory) { downloadService.clear(); } if(!background) { - downloadService.download(songs, save, autoplay, playNext); + downloadService.download(songs, save, autoplay, playNext, false); if(!append) { transition = true; } @@ -1553,7 +1557,7 @@ protected Void doInBackground() throws Throwable { } downloadService.clear(); - downloadService.download(entries, false, true, true, entries.indexOf(song), position); + downloadService.download(entries, false, true, true, false, 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 c7298169b..50a2d34e8 100644 --- a/src/github/daneren2005/dsub/service/DownloadService.java +++ b/src/github/daneren2005/dsub/service/DownloadService.java @@ -53,11 +53,12 @@ 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; import java.util.Timer; import java.util.TimerTask; @@ -69,6 +70,7 @@ 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; @@ -114,7 +116,6 @@ public class DownloadService extends Service { private Handler mediaPlayerHandler; private final DownloadServiceLifecycleSupport lifecycleSupport = new DownloadServiceLifecycleSupport(this); private ShufflePlayBuffer shufflePlayBuffer; - private Random random = new Random(); private final LruCache downloadFileCache = new LruCache(100); private final List cleanupCandidates = new ArrayList(); @@ -129,8 +130,7 @@ public class DownloadService extends Service { private PlayerState playerState = IDLE; private PlayerState nextPlayerState = IDLE; private boolean removePlayed; - private boolean shuffleRemote; - private boolean shuffleMode; + private boolean shufflePlay; private long revision; private static DownloadService instance; private String suggestedPlaylistName; @@ -229,7 +229,6 @@ public boolean onError(MediaPlayer mediaPlayer, int what, int more) { instance = this; lifecycleSupport.onCreate(); shufflePlayBuffer = new ShufflePlayBuffer(this); - shuffleMode = prefs.getBoolean(Constants.PREFERENCES_KEY_SHUFFLE_MODE, false); } @Override @@ -302,11 +301,11 @@ public IBinder onBind(Intent intent) { return binder; } - public synchronized void download(List songs, boolean save, boolean autoplay, boolean playNext) { - download(songs, save, autoplay, playNext, 0, 0); + public synchronized void download(List songs, boolean save, boolean autoplay, boolean playNext, boolean shuffle) { + download(songs, save, autoplay, playNext, shuffle, 0, 0); } - public synchronized void download(List songs, boolean save, boolean autoplay, boolean playNext, int start, int position) { - setShuffleRemote(false); + public synchronized void download(List songs, boolean save, boolean autoplay, boolean playNext, boolean shuffle, int start, int position) { + setShufflePlayEnabled(false); int offset = 1; if (songs.isEmpty()) { @@ -339,6 +338,10 @@ public synchronized void download(List songs, boolean save } updateJukeboxPlaylist(); + if(shuffle) { + shuffle(); + } + if (autoplay) { play(start, true, position); } else { @@ -393,12 +396,12 @@ public synchronized void restore(List songs, List 1); - } - - return newIndex; + return index; } public DownloadFile getCurrentPlaying() { @@ -1731,7 +1725,7 @@ public synchronized void checkDownloads() { if(removePlayed) { checkRemovePlayed(); } - if (shuffleRemote) { + if (shufflePlay) { checkShufflePlay(); } @@ -1913,7 +1907,7 @@ private boolean isPastCutoff(int position, int duration, boolean allowSkipping) // Is an audio book // Next playing exists and is not a wrap around or a shuffle // Next playing is from same context as current playing, so not at end of list - if(entry.isAudioBook() && nextPlaying != null && downloadList.indexOf(nextPlaying) != 0 && !shuffleMode && !shuffleRemote + if(entry.isAudioBook() && nextPlaying != null && downloadList.indexOf(nextPlaying) != 0 && !shufflePlay && entry.getParent() != null && entry.getParent().equals(nextPlaying.getSong().getParent())) { isPastCutoff = false; } diff --git a/src/github/daneren2005/dsub/service/DownloadServiceLifecycleSupport.java b/src/github/daneren2005/dsub/service/DownloadServiceLifecycleSupport.java index 9cd2896bb..0a1e2cddd 100644 --- a/src/github/daneren2005/dsub/service/DownloadServiceLifecycleSupport.java +++ b/src/github/daneren2005/dsub/service/DownloadServiceLifecycleSupport.java @@ -198,7 +198,7 @@ public void run() { } editor.commit(); - downloadService.setShuffleRemote(true); + downloadService.setShufflePlayEnabled(true); } else { downloadService.start(); } diff --git a/src/github/daneren2005/dsub/util/Constants.java b/src/github/daneren2005/dsub/util/Constants.java index e5707cca2..50651a801 100644 --- a/src/github/daneren2005/dsub/util/Constants.java +++ b/src/github/daneren2005/dsub/util/Constants.java @@ -113,8 +113,7 @@ public final class Constants { public static final String PREFERENCES_KEY_PERSISTENT_NOTIFICATION = "persistentNotification"; public static final String PREFERENCES_KEY_GAPLESS_PLAYBACK = "gaplessPlayback"; public static final String PREFERENCES_KEY_REMOVE_PLAYED = "removePlayed"; - public static final String PREFERENCES_KEY_SHUFFLE_REMOTE = "shuffleMode"; - public static final String PREFERENCES_KEY_SHUFFLE_MODE = "shuffleCurrentMode"; + public static final String PREFERENCES_KEY_SHUFFLE_MODE = "shuffleMode"; public static final String PREFERENCES_KEY_CHAT_REFRESH = "chatRefreshRate"; public static final String PREFERENCES_KEY_CHAT_ENABLED = "chatEnabled"; public static final String PREFERENCES_KEY_VIDEO_PLAYER = "videoPlayer"; diff --git a/test/github/daneren2005/dsub/service/DownloadServiceTest.java b/test/github/daneren2005/dsub/service/DownloadServiceTest.java index 7814b4ec5..44b77b844 100644 --- a/test/github/daneren2005/dsub/service/DownloadServiceTest.java +++ b/test/github/daneren2005/dsub/service/DownloadServiceTest.java @@ -82,7 +82,7 @@ public void testNextWithPlayList() throws InterruptedException { // Download two songs downloadService.getDownloads().clear(); downloadService.download(this.createMusicSongs(2), false, false, false, - 0, 0); + false, 0, 0); Log.w("testPreviousWithPlayList", "Start waiting to downloads"); Thread.sleep(5000); @@ -106,7 +106,7 @@ public void testPreviousWithPlayList() throws InterruptedException { // Download two songs downloadService.getDownloads().clear(); downloadService.download(this.createMusicSongs(2), false, false, false, - 0, 0); + false, 0, 0); Log.w("testPreviousWithPlayList", "Start waiting downloads"); Thread.sleep(5000); @@ -185,7 +185,7 @@ public void testTogglePlayPauseWithPlayList() throws InterruptedException { // Download two songs downloadService.getDownloads().clear(); downloadService.download(this.createMusicSongs(2), false, false, false, - 0, 0); + false, 0, 0); Log.w("testPreviousWithPlayList", "Start waiting downloads"); Thread.sleep(5000); @@ -209,7 +209,7 @@ public void testAutoplay() throws InterruptedException { // Download one songs downloadService.getDownloads().clear(); downloadService.download(this.createMusicSongs(1), false, true, false, - 0, 0); + false, 0, 0); Log.w("testPreviousWithPlayList", "Start waiting downloads"); Thread.sleep(5000); @@ -242,7 +242,7 @@ public void testAddMusicToDownload() { // Launch download downloadService.download(this.createMusicSongs(1), false, false, false, - 0, 0); + false, 0, 0); // Check number of download after int afterDownloadAction = 0;