Skip to content

Commit

Permalink
Show error if StreamInfo fetching fails
Browse files Browse the repository at this point in the history
  • Loading branch information
gitryder committed Sep 21, 2021
1 parent 024a03c commit 52f8dce
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
import androidx.fragment.app.Fragment;

import org.schabi.newpipe.R;
import org.schabi.newpipe.error.ErrorActivity;
import org.schabi.newpipe.error.ErrorInfo;
import org.schabi.newpipe.error.UserAction;
import org.schabi.newpipe.extractor.stream.StreamInfoItem;
import org.schabi.newpipe.local.dialog.PlaylistAppendDialog;
import org.schabi.newpipe.local.dialog.PlaylistCreationDialog;
Expand Down Expand Up @@ -50,7 +53,10 @@ public enum StreamDialogEntry {
NavigationHelper.openDownloadDialog(
(AppCompatActivity) fragment.getActivity(), result);
}
});
}, throwable -> ErrorActivity.reportErrorInSnackbar(fragment.getActivity(),
new ErrorInfo(throwable, UserAction.DOWNLOAD_OPEN_DIALOG,
"Fetching Stream Info",
serviceId)));
}),
/**
* Enqueues the stream automatically to the current PlayerType.<br>
Expand Down

0 comments on commit 52f8dce

Please sign in to comment.