public class PeertubeStreamExtractor extends StreamExtractor
StreamExtractor.Privacy
NO_AGE_LIMIT, UNKNOWN_SUBSCRIBER_COUNT
Constructor and Description |
---|
PeertubeStreamExtractor(StreamingService service,
LinkHandler linkHandler) |
Modifier and Type | Method and Description |
---|---|
int |
getAgeLimit()
Get the age limit.
|
List<AudioStream> |
getAudioStreams()
This should return a list of available
AudioStream s. |
String |
getCategory()
The name of the category of the stream.
|
Description |
getDescription()
This is the stream description.
|
long |
getDislikeCount()
The amount of dislikes a video/audio stream got.
|
String |
getHlsUrl()
I am not sure if this is in use, and how this is used.
|
String |
getHost()
The host of the stream (Eg.
|
Locale |
getLanguageInfo()
The locale language of the stream.
|
long |
getLength()
This should return the length of a video in seconds.
|
String |
getLicence()
The name of the licence of the stream.
|
long |
getLikeCount()
The amount of likes a video/audio stream got.
|
String |
getName()
Get the name
|
StreamExtractor.Privacy |
getPrivacy()
The privacy of the stream (Eg.
|
StreamInfoItemsCollector |
getRelatedItems()
Should return a list of streams related to the current handled.
|
StreamType |
getStreamType()
Get the
StreamType . |
String |
getSubChannelAvatarUrl()
The url to the image file/profile picture/avatar of the sub-channel of the stream.
|
String |
getSubChannelName()
The name of the sub-channel of the stream.
|
String |
getSubChannelUrl()
The Url to the page of the sub-channel of the stream.
|
List<SubtitlesStream> |
getSubtitles(MediaFormat format)
This will return a list of available
SubtitlesStream s given by a specific type. |
List<SubtitlesStream> |
getSubtitlesDefault()
This will return a list of available
SubtitlesStream s. |
String |
getSupportInfo()
The support information of the stream.
|
List<String> |
getTags()
The list of tags of the stream.
|
String |
getTextualUploadDate()
The original textual date provided by the service.
|
String |
getThumbnailUrl()
This will return the url to the thumbnail of the stream.
|
long |
getTimeStamp()
If the url you are currently handling contains a time stamp/seek, you can return the
position it represents here.
|
DateWrapper |
getUploadDate()
A more general
Calendar instance set to the date provided by the service.Implementations usually will just parse the date returned from the StreamExtractor.getTextualUploadDate() . |
String |
getUploaderAvatarUrl()
The url to the image file/profile picture/avatar of the creator/uploader of the stream.
|
String |
getUploaderName()
The name of the creator/uploader of the stream.
|
String |
getUploaderUrl()
The Url to the page of the creator/uploader of the stream.
|
List<VideoStream> |
getVideoOnlyStreams()
This should return a list of available
VideoStream s. |
List<VideoStream> |
getVideoStreams()
This should return a list of available
VideoStream s. |
long |
getViewCount()
The count of how many people have watched the video/listened to the audio stream.
|
void |
onFetchPage(Downloader downloader)
Fetch the current page.
|
getDashMpdUrl, getErrorMessage, getFrames, getMetaInfo, getRelatedStreams, getStreamSegments, getTimestampSeconds, getUploaderSubscriberCount, isUploaderVerified
assertPageFetched, fetchPage, forceContentCountry, forceLocalization, getBaseUrl, getDownloader, getExtractorContentCountry, getExtractorLocalization, getId, getLinkHandler, getOriginalUrl, getService, getServiceId, getTimeAgoParser, getUrl, isPageFetched
public PeertubeStreamExtractor(StreamingService service, LinkHandler linkHandler) throws ParsingException
ParsingException
public String getTextualUploadDate() throws ParsingException
StreamExtractor
StreamExtractor.getUploadDate()
isn't provided by the service, or it fails for some reason.
If the stream is a live stream, null
should be returned.
getTextualUploadDate
in class StreamExtractor
null
.ParsingException
- if there is an error in the extractionStreamExtractor.getUploadDate()
public DateWrapper getUploadDate() throws ParsingException
StreamExtractor
Calendar
instance set to the date provided by the service.StreamExtractor.getTextualUploadDate()
.
If the stream is a live stream, null
should be returned.
getUploadDate
in class StreamExtractor
null
.ParsingException
- if there is an error in the extraction
or the extracted date couldn't be parsed.StreamExtractor.getTextualUploadDate()
@Nonnull public String getThumbnailUrl() throws ParsingException
StreamExtractor
getThumbnailUrl
in class StreamExtractor
ParsingException
@Nonnull public Description getDescription() throws ParsingException
StreamExtractor
getDescription
in class StreamExtractor
Description.EMPTY_DESCRIPTION
if the
description is empty.ParsingException
public int getAgeLimit() throws ParsingException
StreamExtractor
getAgeLimit
in class StreamExtractor
ParsingException
- if an error occurs while parsingpublic long getLength()
StreamExtractor
getLength
in class StreamExtractor
public long getTimeStamp() throws ParsingException
StreamExtractor
getTimeStamp
in class StreamExtractor
ParsingException
public long getViewCount()
StreamExtractor
getViewCount
in class StreamExtractor
public long getLikeCount()
StreamExtractor
getLikeCount
in class StreamExtractor
public long getDislikeCount()
StreamExtractor
getDislikeCount
in class StreamExtractor
@Nonnull public String getUploaderUrl() throws ParsingException
StreamExtractor
ChannelExtractor
, so be sure to implement that one before you return a value here,
otherwise NewPipe will crash if one selects this url.getUploaderUrl
in class StreamExtractor
ParsingException
@Nonnull public String getUploaderName() throws ParsingException
StreamExtractor
getUploaderName
in class StreamExtractor
ParsingException
@Nonnull public String getUploaderAvatarUrl()
StreamExtractor
getUploaderAvatarUrl
in class StreamExtractor
@Nonnull public String getSubChannelUrl() throws ParsingException
StreamExtractor
ChannelExtractor
, so be sure to implement that one before you return a value here,
otherwise NewPipe will crash if one selects this url.getSubChannelUrl
in class StreamExtractor
ParsingException
@Nonnull public String getSubChannelName() throws ParsingException
StreamExtractor
getSubChannelName
in class StreamExtractor
ParsingException
@Nonnull public String getSubChannelAvatarUrl()
StreamExtractor
getSubChannelAvatarUrl
in class StreamExtractor
@Nonnull public String getHlsUrl()
StreamExtractor
getHlsUrl
in class StreamExtractor
public List<AudioStream> getAudioStreams()
StreamExtractor
AudioStream
s.
You can also return null or an empty list, however be aware that if you don't return anything
in getVideoStreams(), getVideoOnlyStreams() and getDashMpdUrl() either the Collector will
handle this as a failed extraction procedure.getAudioStreams
in class StreamExtractor
public List<VideoStream> getVideoStreams() throws ExtractionException
StreamExtractor
VideoStream
s.
Be aware this is the list of video streams which do contain an audio stream.
You can also return null or an empty list, however be aware that if you don't return anything
in getAudioStreams(), getVideoOnlyStreams() and getDashMpdUrl() either the Collector will
handle this as a failed extraction procedure.getVideoStreams
in class StreamExtractor
ExtractionException
public List<VideoStream> getVideoOnlyStreams()
StreamExtractor
VideoStream
s.
Be aware this is the list of video streams which do NOT contain an audio stream.
You can also return null or an empty list, however be aware that if you don't return anything
in getAudioStreams(), getVideoStreams() and getDashMpdUrl() either the Collector will handle
this as a failed extraction procedure.getVideoOnlyStreams
in class StreamExtractor
@Nonnull public List<SubtitlesStream> getSubtitlesDefault()
StreamExtractor
SubtitlesStream
s.
If no subtitles are available an empty list can be returned.getSubtitlesDefault
in class StreamExtractor
@Nonnull public List<SubtitlesStream> getSubtitles(MediaFormat format)
StreamExtractor
SubtitlesStream
s given by a specific type.
If no subtitles in that specific format are available an empty list can be returned.getSubtitles
in class StreamExtractor
format
- the media format by which the subtitles should be filteredpublic StreamType getStreamType()
StreamExtractor
StreamType
.getStreamType
in class StreamExtractor
@Nullable public StreamInfoItemsCollector getRelatedItems() throws IOException, ExtractionException
StreamExtractor
null
.getRelatedItems
in class StreamExtractor
IOException
ExtractionException
@Nonnull public List<String> getTags()
StreamExtractor
getTags
in class StreamExtractor
@Nonnull public String getSupportInfo()
StreamExtractor
getSupportInfo
in class StreamExtractor
public void onFetchPage(Downloader downloader) throws IOException, ExtractionException
Extractor
onFetchPage
in class Extractor
downloader
- the downloader to useIOException
- if the page can not be loadedExtractionException
- if the pages content is not understood@Nonnull public String getName() throws ParsingException
Extractor
getName
in class Extractor
ParsingException
- if the name cannot be extracted@Nonnull public String getHost() throws ParsingException
StreamExtractor
getHost
in class StreamExtractor
ParsingException
@Nonnull public StreamExtractor.Privacy getPrivacy()
StreamExtractor
getPrivacy
in class StreamExtractor
@Nonnull public String getCategory() throws ParsingException
StreamExtractor
getCategory
in class StreamExtractor
ParsingException
@Nonnull public String getLicence() throws ParsingException
StreamExtractor
getLicence
in class StreamExtractor
ParsingException
public Locale getLanguageInfo()
StreamExtractor
getLanguageInfo
in class StreamExtractor
null
.