use of com.kabouzeid.gramophone.model.PlaylistSong in project Phonograph by kabouzeid.
the class PlaylistSongLoader method getPlaylistSongList.
@NonNull
public static ArrayList<PlaylistSong> getPlaylistSongList(@NonNull final Context context, final int playlistId) {
ArrayList<PlaylistSong> songs = new ArrayList<>();
Cursor cursor = makePlaylistSongCursor(context, playlistId);
if (cursor != null && cursor.moveToFirst()) {
do {
songs.add(getPlaylistSongFromCursorImpl(cursor, playlistId));
} while (cursor.moveToNext());
}
if (cursor != null) {
cursor.close();
}
return songs;
}
use of com.kabouzeid.gramophone.model.PlaylistSong in project Phonograph by kabouzeid.
the class PlaylistSongLoader method getPlaylistSongList.
@NonNull
public static List<PlaylistSong> getPlaylistSongList(@NonNull final Context context, final long playlistId) {
List<PlaylistSong> songs = new ArrayList<>();
Cursor cursor = makePlaylistSongCursor(context, playlistId);
if (cursor != null && cursor.moveToFirst()) {
do {
songs.add(getPlaylistSongFromCursorImpl(cursor, playlistId));
} while (cursor.moveToNext());
}
if (cursor != null) {
cursor.close();
}
return songs;
}
Aggregations