mirror of
https://github.com/TeamPiped/Piped-Backend.git
synced 2024-08-14 23:51:41 +00:00
Add more info to captions.
This commit is contained in:
parent
179025af7e
commit
2139b1431b
2 changed files with 11 additions and 5 deletions
|
@ -81,8 +81,10 @@ public class ResponseHelper {
|
|||
final StreamInfo info = futureStream.get(10, TimeUnit.SECONDS);
|
||||
|
||||
// System.out.println(Constants.mapper.writeValueAsString(info.getStreamSegments()));
|
||||
info.getSubtitles().forEach(subtitle -> subtitles
|
||||
.add(new Subtitle(rewriteURL(subtitle.getUrl()), subtitle.getFormat().getMimeType())));
|
||||
info.getSubtitles()
|
||||
.forEach(subtitle -> subtitles.add(new Subtitle(rewriteURL(subtitle.getUrl()),
|
||||
subtitle.getFormat().getMimeType(), subtitle.getDisplayLanguageName(),
|
||||
subtitle.getLanguageTag(), subtitle.isAutoGenerated())));
|
||||
|
||||
final List<PipedStream> videoStreams = new ObjectArrayList<>();
|
||||
final List<PipedStream> audioStreams = new ObjectArrayList<>();
|
||||
|
|
|
@ -2,10 +2,14 @@ package me.kavin.piped.utils.obj;
|
|||
|
||||
public class Subtitle {
|
||||
|
||||
public final String url, mimeType;
|
||||
public final String url, mimeType, name, code;
|
||||
public final boolean autoGenerated;
|
||||
|
||||
public Subtitle(String url, String mimeType) {
|
||||
public Subtitle(String url, String mimeType, String name, String code, boolean autoGenerated) {
|
||||
this.url = url;
|
||||
this.mimeType = mimeType;
|
||||
};
|
||||
this.name = name;
|
||||
this.code = code;
|
||||
this.autoGenerated = autoGenerated;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue