kopia lustrzana https://github.com/TeamNewPipe/NewPipeExtractor
Minor refactoring in Stream.java
rodzic
6b6ae8bff0
commit
d600f8d5ec
|
@ -68,7 +68,7 @@ public abstract class Stream implements Serializable {
|
||||||
* @param streamList the list of {@link Stream}s which will be compared
|
* @param streamList the list of {@link Stream}s which will be compared
|
||||||
* @return whether the list already contains one stream with equals stats
|
* @return whether the list already contains one stream with equals stats
|
||||||
*/
|
*/
|
||||||
public static boolean containSimilarStream(final Stream stream,
|
public static boolean containSimilarStream(@Nonnull final Stream stream,
|
||||||
final List<? extends Stream> streamList) {
|
final List<? extends Stream> streamList) {
|
||||||
if (isNullOrEmpty(streamList)) {
|
if (isNullOrEmpty(streamList)) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -98,10 +98,8 @@ public abstract class Stream implements Serializable {
|
||||||
* @return whether the stream have the same stats or not, based on the criteria above
|
* @return whether the stream have the same stats or not, based on the criteria above
|
||||||
*/
|
*/
|
||||||
public boolean equalStats(@Nullable final Stream other) {
|
public boolean equalStats(@Nullable final Stream other) {
|
||||||
if (other == null || mediaFormat == null || other.mediaFormat == null) {
|
return other != null && mediaFormat != null && other.mediaFormat != null
|
||||||
return false;
|
&& mediaFormat.id == other.mediaFormat.id && deliveryMethod == other.deliveryMethod
|
||||||
}
|
|
||||||
return mediaFormat.id == other.mediaFormat.id && deliveryMethod == other.deliveryMethod
|
|
||||||
&& isUrl == other.isUrl;
|
&& isUrl == other.isUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -137,6 +135,7 @@ public abstract class Stream implements Serializable {
|
||||||
*
|
*
|
||||||
* @return the content or URL
|
* @return the content or URL
|
||||||
*/
|
*/
|
||||||
|
@Nonnull
|
||||||
public String getContent() {
|
public String getContent() {
|
||||||
return content;
|
return content;
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue