Search in sources :

Example 1 with StartDownloadTask

use of com.frostwire.android.gui.tasks.StartDownloadTask in project frostwire by frostwire.

the class ConfirmSoundcloudDownloadDialog method startDownloads.

private static void startDownloads(Context ctx, List<? extends SearchResult> srs) {
    if (srs != null && !srs.isEmpty()) {
        for (SearchResult sr : srs) {
            StartDownloadTask task = new StartDownloadTask(ctx, sr);
            Tasks.executeParallel(task);
        }
        UIUtils.showTransfersOnDownloadStart(ctx);
    }
}
Also used : StartDownloadTask(com.frostwire.android.gui.tasks.StartDownloadTask) SoundcloudSearchResult(com.frostwire.search.soundcloud.SoundcloudSearchResult) SearchResult(com.frostwire.search.SearchResult)

Example 2 with StartDownloadTask

use of com.frostwire.android.gui.tasks.StartDownloadTask in project frostwire by frostwire.

the class SearchFragment method startDownload.

public static void startDownload(Context ctx, SearchResult sr, String message) {
    if (sr instanceof AbstractTorrentSearchResult) {
        UIUtils.showShortMessage(ctx, R.string.fetching_torrent_ellipsis);
    }
    StartDownloadTask task = new StartDownloadTask(ctx, sr, message);
    Tasks.executeParallel(task);
}
Also used : AbstractTorrentSearchResult(com.frostwire.search.torrent.AbstractTorrentSearchResult) StartDownloadTask(com.frostwire.android.gui.tasks.StartDownloadTask)

Aggregations

StartDownloadTask (com.frostwire.android.gui.tasks.StartDownloadTask)2 SearchResult (com.frostwire.search.SearchResult)1 SoundcloudSearchResult (com.frostwire.search.soundcloud.SoundcloudSearchResult)1 AbstractTorrentSearchResult (com.frostwire.search.torrent.AbstractTorrentSearchResult)1