mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2025-01-09 08:50:34 +00:00
media browser: clean up Uri.parse() null checks
This commit is contained in:
parent
189c70f9d3
commit
89bdfef4b9
@ -315,10 +315,6 @@ public class MediaBrowserConnector implements MediaSessionConnector.PlaybackPrep
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
final Uri parentIdUri = Uri.parse(parentId);
|
final Uri parentIdUri = Uri.parse(parentId);
|
||||||
if (parentIdUri == null) {
|
|
||||||
throw parseError();
|
|
||||||
}
|
|
||||||
|
|
||||||
final List<String> path = new ArrayList<>(parentIdUri.getPathSegments());
|
final List<String> path = new ArrayList<>(parentIdUri.getPathSegments());
|
||||||
|
|
||||||
if (path.isEmpty()) {
|
if (path.isEmpty()) {
|
||||||
@ -510,10 +506,6 @@ public class MediaBrowserConnector implements MediaSessionConnector.PlaybackPrep
|
|||||||
private Single<PlayQueue> extractPlayQueueFromMediaId(final String mediaId) {
|
private Single<PlayQueue> extractPlayQueueFromMediaId(final String mediaId) {
|
||||||
try {
|
try {
|
||||||
final Uri mediaIdUri = Uri.parse(mediaId);
|
final Uri mediaIdUri = Uri.parse(mediaId);
|
||||||
if (mediaIdUri == null) {
|
|
||||||
throw parseError();
|
|
||||||
}
|
|
||||||
|
|
||||||
final List<String> path = new ArrayList<>(mediaIdUri.getPathSegments());
|
final List<String> path = new ArrayList<>(mediaIdUri.getPathSegments());
|
||||||
|
|
||||||
if (path.isEmpty()) {
|
if (path.isEmpty()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user