mirror of
https://github.com/TeamNewPipe/NewPipeExtractor.git
synced 2024-12-13 22:00:32 +05:30
Add deprecated old method calls to avoid breaking API
This commit is contained in:
parent
14f6f1b7c3
commit
c877712647
@ -337,6 +337,22 @@ public abstract class StreamExtractor extends Extractor {
|
||||
public abstract InfoItemsCollector<? extends InfoItem, ? extends InfoItemExtractor>
|
||||
getRelatedItems() throws IOException, ExtractionException;
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #getRelatedItems()}. May be removed in a future version.
|
||||
* @return The result of {@link #getRelatedItems()} if it is a
|
||||
* StreamInfoItemsCollector, null otherwise
|
||||
* @throws IOException
|
||||
* @throws ExtractionException
|
||||
*/
|
||||
@Deprecated
|
||||
@Nullable
|
||||
public StreamInfoItemsCollector getRelatedStreams() throws IOException, ExtractionException {
|
||||
InfoItemsCollector<?, ?> collector = getRelatedItems();
|
||||
if (collector instanceof StreamInfoItemsCollector) {
|
||||
return (StreamInfoItemsCollector) collector;
|
||||
} else return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Should return a list of Frameset object that contains preview of stream frames
|
||||
*
|
||||
|
@ -606,10 +606,26 @@ public class StreamInfo extends Info {
|
||||
return relatedItems;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #getRelatedItems()}
|
||||
*/
|
||||
@Deprecated
|
||||
public List<InfoItem> getRelatedStreams() {
|
||||
return getRelatedItems();
|
||||
}
|
||||
|
||||
public void setRelatedItems(List<InfoItem> relatedItems) {
|
||||
this.relatedItems = relatedItems;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #setRelatedItems(List)}
|
||||
*/
|
||||
@Deprecated
|
||||
public void setRelatedStreams(List<InfoItem> relatedItems) {
|
||||
setRelatedItems(relatedItems);
|
||||
}
|
||||
|
||||
public long getStartPosition() {
|
||||
return startPosition;
|
||||
}
|
||||
|
@ -41,4 +41,12 @@ public class ExtractorHelper {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #getRelatedItemsOrLogError(StreamInfo, StreamExtractor)}
|
||||
*/
|
||||
@Deprecated
|
||||
public static List<InfoItem> getRelatedVideosOrLogError(StreamInfo info, StreamExtractor extractor) {
|
||||
return getRelatedItemsOrLogError(info, extractor);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user