Search in sources :

Example 1 with EphemeralPlaylist

use of com.frostwire.android.core.player.EphemeralPlaylist in project frostwire by frostwire.

the class Librarian method createEphemeralPlaylist.

public EphemeralPlaylist createEphemeralPlaylist(final Context context, FileDescriptor fd) {
    List<FileDescriptor> fds = getFiles(context, Constants.FILE_TYPE_AUDIO, FilenameUtils.getPath(fd.filePath), false);
    if (fds.size() == 0) {
        // just in case
        Log.w(TAG, "Logic error creating ephemeral playlist");
        fds.add(fd);
    }
    EphemeralPlaylist playlist = new EphemeralPlaylist(fds);
    playlist.setNextItem(new PlaylistItem(fd));
    return playlist;
}
Also used : EphemeralPlaylist(com.frostwire.android.core.player.EphemeralPlaylist) FileDescriptor(com.frostwire.android.core.FileDescriptor) PlaylistItem(com.frostwire.android.core.player.PlaylistItem)

Aggregations

FileDescriptor (com.frostwire.android.core.FileDescriptor)1 EphemeralPlaylist (com.frostwire.android.core.player.EphemeralPlaylist)1 PlaylistItem (com.frostwire.android.core.player.PlaylistItem)1