mirror of
https://github.com/TeamPiped/Piped-Backend.git
synced 2024-08-14 23:51:41 +00:00
Implement support for audio track info.
This commit is contained in:
parent
6ad27aea2a
commit
98628aff98
2 changed files with 6 additions and 4 deletions
|
@ -141,7 +141,7 @@ public class StreamHandlers {
|
|||
.forEach(stream -> audioStreams.add(new PipedStream(rewriteVideoURL(stream.getContent()),
|
||||
String.valueOf(stream.getFormat()), stream.getAverageBitrate() + " kbps",
|
||||
stream.getFormat().getMimeType(), false, stream.getBitrate(), stream.getInitStart(),
|
||||
stream.getInitEnd(), stream.getIndexStart(), stream.getIndexEnd(), stream.getCodec())));
|
||||
stream.getInitEnd(), stream.getIndexStart(), stream.getIndexEnd(), stream.getCodec(), stream.getAudioTrackId(), stream.getAudioTrackName())));
|
||||
}
|
||||
|
||||
final List<ContentItem> relatedStreams = collectRelatedItems(info.getRelatedItems());
|
||||
|
|
|
@ -2,7 +2,7 @@ package me.kavin.piped.utils.obj;
|
|||
|
||||
public class PipedStream {
|
||||
|
||||
public String url, format, quality, mimeType, codec;
|
||||
public String url, format, quality, mimeType, codec, audioTrackId, audioTrackName;
|
||||
public boolean videoOnly;
|
||||
|
||||
public int bitrate, initStart, initEnd, indexStart, indexEnd, width, height, fps;
|
||||
|
@ -16,7 +16,7 @@ public class PipedStream {
|
|||
}
|
||||
|
||||
public PipedStream(String url, String format, String quality, String mimeType, boolean videoOnly, int bitrate,
|
||||
int initStart, int initEnd, int indexStart, int indexEnd, String codec) {
|
||||
int initStart, int initEnd, int indexStart, int indexEnd, String codec, String audioTrackId, String audioTrackName) {
|
||||
this.url = url;
|
||||
this.format = format;
|
||||
this.quality = quality;
|
||||
|
@ -28,10 +28,12 @@ public class PipedStream {
|
|||
this.indexStart = indexStart;
|
||||
this.indexEnd = indexEnd;
|
||||
this.codec = codec;
|
||||
this.audioTrackId = audioTrackId;
|
||||
this.audioTrackName = audioTrackName;
|
||||
}
|
||||
|
||||
public PipedStream(String url, String format, String quality, String mimeType, boolean videoOnly, int bitrate,
|
||||
int initStart, int initEnd, int indexStart, int indexEnd, String codec, int width, int height, int fps) {
|
||||
int initStart, int initEnd, int indexStart, int indexEnd, String codec, int width, int height, int fps) {
|
||||
this.url = url;
|
||||
this.format = format;
|
||||
this.quality = quality;
|
||||
|
|
Loading…
Reference in a new issue