mirror of
https://github.com/TeamPiped/Piped-Backend.git
synced 2024-12-13 22:00:29 +05:30
Add audio track type field.
This commit is contained in:
parent
8614e6a0d8
commit
c7fab90f66
@ -10,6 +10,7 @@ import org.schabi.newpipe.extractor.stream.StreamInfoItem;
|
||||
import org.schabi.newpipe.extractor.stream.StreamType;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import static me.kavin.piped.utils.URLUtils.*;
|
||||
|
||||
@ -52,7 +53,9 @@ public class CollectionUtils {
|
||||
.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.getAudioTrackId(), stream.getAudioTrackName())));
|
||||
stream.getInitEnd(), stream.getIndexStart(), stream.getIndexEnd(), stream.getCodec(), stream.getAudioTrackId(), stream.getAudioTrackName(),
|
||||
Optional.ofNullable(stream.getAudioTrackType()).map(Enum::name).orElse(null)
|
||||
)));
|
||||
}
|
||||
|
||||
final List<ContentItem> relatedStreams = collectRelatedItems(info.getRelatedItems());
|
||||
|
@ -5,7 +5,7 @@ import lombok.NoArgsConstructor;
|
||||
@NoArgsConstructor
|
||||
public class PipedStream {
|
||||
|
||||
public String url, format, quality, mimeType, codec, audioTrackId, audioTrackName;
|
||||
public String url, format, quality, mimeType, codec, audioTrackId, audioTrackName, audioTrackType;
|
||||
public boolean videoOnly;
|
||||
|
||||
public int bitrate, initStart, initEnd, indexStart, indexEnd, width, height, fps;
|
||||
@ -19,7 +19,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, String audioTrackId, String audioTrackName) {
|
||||
int initStart, int initEnd, int indexStart, int indexEnd, String codec, String audioTrackId, String audioTrackName, String audioTrackType) {
|
||||
this.url = url;
|
||||
this.format = format;
|
||||
this.quality = quality;
|
||||
@ -33,6 +33,7 @@ public class PipedStream {
|
||||
this.codec = codec;
|
||||
this.audioTrackId = audioTrackId;
|
||||
this.audioTrackName = audioTrackName;
|
||||
this.audioTrackType = audioTrackType;
|
||||
}
|
||||
|
||||
public PipedStream(String url, String format, String quality, String mimeType, boolean videoOnly, int bitrate,
|
||||
|
Loading…
Reference in New Issue
Block a user