1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2025-01-08 16:30:34 +00:00

media browser: clean up Uri.parse() null checks

This commit is contained in:
Haggai Eran 2024-08-16 17:44:20 +03:00 committed by Siddhesh Naik
parent 189c70f9d3
commit 89bdfef4b9

View File

@ -315,10 +315,6 @@ public class MediaBrowserConnector implements MediaSessionConnector.PlaybackPrep
try {
final Uri parentIdUri = Uri.parse(parentId);
if (parentIdUri == null) {
throw parseError();
}
final List<String> path = new ArrayList<>(parentIdUri.getPathSegments());
if (path.isEmpty()) {
@ -510,10 +506,6 @@ public class MediaBrowserConnector implements MediaSessionConnector.PlaybackPrep
private Single<PlayQueue> extractPlayQueueFromMediaId(final String mediaId) {
try {
final Uri mediaIdUri = Uri.parse(mediaId);
if (mediaIdUri == null) {
throw parseError();
}
final List<String> path = new ArrayList<>(mediaIdUri.getPathSegments());
if (path.isEmpty()) {