From 913d31ad0de5df38d28935488dee79e25156dfe5 Mon Sep 17 00:00:00 2001 From: Zsombor Gegesy Date: Sun, 14 Aug 2022 01:32:53 +0200 Subject: [PATCH] Remove unused StreamMetaData class --- .../YouTube/VideoStream/StreamMetaData.java | 78 ------------------- .../YouTube/newpipe/NewPipeService.java | 5 +- .../interfaces/GetDesiredStreamListener.java | 1 - 3 files changed, 1 insertion(+), 83 deletions(-) delete mode 100644 app/src/main/java/free/rm/skytube/businessobjects/YouTube/VideoStream/StreamMetaData.java diff --git a/app/src/main/java/free/rm/skytube/businessobjects/YouTube/VideoStream/StreamMetaData.java b/app/src/main/java/free/rm/skytube/businessobjects/YouTube/VideoStream/StreamMetaData.java deleted file mode 100644 index 3d80a015b3..0000000000 --- a/app/src/main/java/free/rm/skytube/businessobjects/YouTube/VideoStream/StreamMetaData.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * SkyTube - * Copyright (C) 2015 Ramon Mifsud - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation (version 3 of the License). - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package free.rm.skytube.businessobjects.YouTube.VideoStream; - - -import android.net.Uri; - -import org.schabi.newpipe.extractor.MediaFormat; -import org.schabi.newpipe.extractor.stream.VideoStream; - -/** - * Represents the meta-data of a YouTube video stream. - */ -public class StreamMetaData { - - /** URL of the stream */ - private Uri uri; - /** Video resolution (e.g. 1080p) */ - private VideoResolution resolution; - /** Video format (e.g. MPEG-4) */ - private MediaFormat format; - - - public StreamMetaData(VideoStream videoStream) { - setUri(videoStream.getContent()); - this.format = videoStream.getFormat(); - this.resolution = VideoResolution.resolutionToVideoResolution(videoStream.resolution); - } - - - private void setUri(String url) { - this.uri = Uri.parse(url); - } - - - - - public Uri getUri() { - return uri; - } - - public VideoResolution getResolution() { - return resolution; - } - - public MediaFormat getFormat() { - return format; - } - - @Override - public String toString() { - return "URI: " + - uri + - '\n' + - "FORMAT: " + - format + - '\n' + - "RESOLUTION: " + - resolution + - '\n'; - } - -} diff --git a/app/src/main/java/free/rm/skytube/businessobjects/YouTube/newpipe/NewPipeService.java b/app/src/main/java/free/rm/skytube/businessobjects/YouTube/newpipe/NewPipeService.java index 9a67c19115..86cb7a6e47 100644 --- a/app/src/main/java/free/rm/skytube/businessobjects/YouTube/newpipe/NewPipeService.java +++ b/app/src/main/java/free/rm/skytube/businessobjects/YouTube/newpipe/NewPipeService.java @@ -62,9 +62,6 @@ import free.rm.skytube.businessobjects.Logger; import free.rm.skytube.businessobjects.YouTube.POJOs.YouTubeChannel; import free.rm.skytube.businessobjects.YouTube.POJOs.YouTubeVideo; -import free.rm.skytube.businessobjects.YouTube.VideoStream.StreamMetaData; -import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers; -import io.reactivex.rxjava3.core.Maybe; /** * Service to interact with remote video services, using the NewPipeExtractor backend. @@ -132,7 +129,7 @@ private ContentId parse(LinkHandlerFactory handlerFactory, String url, Streaming * Returns a list of video/stream meta-data that is supported by this app for this video ID. * * @param videoId the id of the video. - * @return List of {@link StreamMetaData}. + * @return List of {@link StreamInfo}. */ public StreamInfo getStreamInfoByVideoId(String videoId) throws ExtractionException, IOException { return getStreamInfoByUrl(getVideoUrl(videoId)); diff --git a/app/src/main/java/free/rm/skytube/businessobjects/interfaces/GetDesiredStreamListener.java b/app/src/main/java/free/rm/skytube/businessobjects/interfaces/GetDesiredStreamListener.java index 14699c8e88..2110f2159b 100644 --- a/app/src/main/java/free/rm/skytube/businessobjects/interfaces/GetDesiredStreamListener.java +++ b/app/src/main/java/free/rm/skytube/businessobjects/interfaces/GetDesiredStreamListener.java @@ -3,7 +3,6 @@ import org.schabi.newpipe.extractor.stream.StreamInfo; import free.rm.skytube.businessobjects.YouTube.POJOs.YouTubeVideo; -import free.rm.skytube.businessobjects.YouTube.VideoStream.StreamMetaData; /** * Interface to be used when retrieving the desired stream (per the user's preferences) from a Video.