Search in sources :

Example 1 with YouTubeDownloadDialog

use of com.frostwire.android.gui.dialogs.YouTubeDownloadDialog in project frostwire by frostwire.

the class PreviewPlayerActivity method onDownloadButtonClick.

private void onDownloadButtonClick() {
    if (Ref.alive(srRef)) {
        Engine.instance().getVibrator().hapticFeedback();
        final FileSearchResult fileSearchResult = srRef.get();
        if (fileSearchResult instanceof YouTubePackageSearchResult) {
            releaseMediaPlayer();
            YouTubeDownloadDialog ytDownloadDlg = YouTubeDownloadDialog.newInstance(this, (YouTubePackageSearchResult) fileSearchResult);
            ytDownloadDlg.show(getFragmentManager());
        } else {
            NewTransferDialog dlg = NewTransferDialog.newInstance(fileSearchResult, false);
            dlg.show(getFragmentManager());
        }
    } else {
        finish();
    }
}
Also used : FileSearchResult(com.frostwire.search.FileSearchResult) YouTubePackageSearchResult(com.frostwire.search.youtube.YouTubePackageSearchResult) YouTubeDownloadDialog(com.frostwire.android.gui.dialogs.YouTubeDownloadDialog) NewTransferDialog(com.frostwire.android.gui.dialogs.NewTransferDialog)

Aggregations

NewTransferDialog (com.frostwire.android.gui.dialogs.NewTransferDialog)1 YouTubeDownloadDialog (com.frostwire.android.gui.dialogs.YouTubeDownloadDialog)1 FileSearchResult (com.frostwire.search.FileSearchResult)1 YouTubePackageSearchResult (com.frostwire.search.youtube.YouTubePackageSearchResult)1