mirror of
https://github.com/TeamPiped/Piped-Backend
synced 2025-09-06 21:41:54 +02:00
Implement support for audio track info.
This commit is contained in:
parent
6ad27aea2a
commit
98628aff98
@ -141,7 +141,7 @@ public class StreamHandlers {
|
|||||||
.forEach(stream -> audioStreams.add(new PipedStream(rewriteVideoURL(stream.getContent()),
|
.forEach(stream -> audioStreams.add(new PipedStream(rewriteVideoURL(stream.getContent()),
|
||||||
String.valueOf(stream.getFormat()), stream.getAverageBitrate() + " kbps",
|
String.valueOf(stream.getFormat()), stream.getAverageBitrate() + " kbps",
|
||||||
stream.getFormat().getMimeType(), false, stream.getBitrate(), stream.getInitStart(),
|
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());
|
final List<ContentItem> relatedStreams = collectRelatedItems(info.getRelatedItems());
|
||||||
|
@ -2,7 +2,7 @@ package me.kavin.piped.utils.obj;
|
|||||||
|
|
||||||
public class PipedStream {
|
public class PipedStream {
|
||||||
|
|
||||||
public String url, format, quality, mimeType, codec;
|
public String url, format, quality, mimeType, codec, audioTrackId, audioTrackName;
|
||||||
public boolean videoOnly;
|
public boolean videoOnly;
|
||||||
|
|
||||||
public int bitrate, initStart, initEnd, indexStart, indexEnd, width, height, fps;
|
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,
|
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.url = url;
|
||||||
this.format = format;
|
this.format = format;
|
||||||
this.quality = quality;
|
this.quality = quality;
|
||||||
@ -28,10 +28,12 @@ public class PipedStream {
|
|||||||
this.indexStart = indexStart;
|
this.indexStart = indexStart;
|
||||||
this.indexEnd = indexEnd;
|
this.indexEnd = indexEnd;
|
||||||
this.codec = codec;
|
this.codec = codec;
|
||||||
|
this.audioTrackId = audioTrackId;
|
||||||
|
this.audioTrackName = audioTrackName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PipedStream(String url, String format, String quality, String mimeType, boolean videoOnly, int bitrate,
|
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.url = url;
|
||||||
this.format = format;
|
this.format = format;
|
||||||
this.quality = quality;
|
this.quality = quality;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user