mirror of
https://github.com/TeamPiped/Piped-Backend.git
synced 2024-12-13 22:00:29 +05:30
Add more info to captions.
This commit is contained in:
parent
179025af7e
commit
2139b1431b
@ -81,8 +81,10 @@ public class ResponseHelper {
|
|||||||
final StreamInfo info = futureStream.get(10, TimeUnit.SECONDS);
|
final StreamInfo info = futureStream.get(10, TimeUnit.SECONDS);
|
||||||
|
|
||||||
// System.out.println(Constants.mapper.writeValueAsString(info.getStreamSegments()));
|
// System.out.println(Constants.mapper.writeValueAsString(info.getStreamSegments()));
|
||||||
info.getSubtitles().forEach(subtitle -> subtitles
|
info.getSubtitles()
|
||||||
.add(new Subtitle(rewriteURL(subtitle.getUrl()), subtitle.getFormat().getMimeType())));
|
.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> videoStreams = new ObjectArrayList<>();
|
||||||
final List<PipedStream> audioStreams = new ObjectArrayList<>();
|
final List<PipedStream> audioStreams = new ObjectArrayList<>();
|
||||||
|
@ -2,10 +2,14 @@ package me.kavin.piped.utils.obj;
|
|||||||
|
|
||||||
public class Subtitle {
|
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.url = url;
|
||||||
this.mimeType = mimeType;
|
this.mimeType = mimeType;
|
||||||
};
|
this.name = name;
|
||||||
|
this.code = code;
|
||||||
|
this.autoGenerated = autoGenerated;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user