-
Notifications
You must be signed in to change notification settings - Fork 420
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #479 from vkay94/stream-segments
Extract stream segments for YouTube
- Loading branch information
Showing
12 changed files
with
274 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
extractor/src/main/java/org/schabi/newpipe/extractor/stream/StreamSegment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
package org.schabi.newpipe.extractor.stream; | ||
|
||
|
||
import javax.annotation.Nullable; | ||
import java.io.Serializable; | ||
|
||
public class StreamSegment implements Serializable { | ||
/** | ||
* Title of this segment | ||
*/ | ||
private String title; | ||
|
||
/** | ||
* Timestamp of the starting point in seconds | ||
*/ | ||
private int startTimeSeconds; | ||
|
||
/** | ||
* Direct url to this segment. This can be null if the service doesn't provide such function. | ||
*/ | ||
@Nullable | ||
public String url; | ||
|
||
/** | ||
* Preview url for this segment. This can be null if the service doesn't provide such function | ||
* or there is no resource found. | ||
*/ | ||
@Nullable | ||
private String previewUrl = null; | ||
|
||
public StreamSegment(String title, int startTimeSeconds) { | ||
this.title = title; | ||
this.startTimeSeconds = startTimeSeconds; | ||
} | ||
|
||
public String getTitle() { | ||
return title; | ||
} | ||
|
||
public void setTitle(final String title) { | ||
this.title = title; | ||
} | ||
|
||
public int getStartTimeSeconds() { | ||
return startTimeSeconds; | ||
} | ||
|
||
public void setStartTimeSeconds(final int startTimeSeconds) { | ||
this.startTimeSeconds = startTimeSeconds; | ||
} | ||
|
||
@Nullable | ||
public String getUrl() { | ||
return url; | ||
} | ||
|
||
public void setUrl(@Nullable final String url) { | ||
this.url = url; | ||
} | ||
|
||
@Nullable | ||
public String getPreviewUrl() { | ||
return previewUrl; | ||
} | ||
|
||
public void setPreviewUrl(@Nullable final String previewUrl) { | ||
this.previewUrl = previewUrl; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.