mirror of
https://github.com/TeamPiped/Piped-Backend
synced 2025-09-05 21:11:05 +02:00
Commit changes.
This commit is contained in:
parent
947d6d5787
commit
dd2ee203bb
@ -19,7 +19,7 @@ dependencies {
|
|||||||
implementation 'org.bouncycastle:bcprov-jdk15on:1.67'
|
implementation 'org.bouncycastle:bcprov-jdk15on:1.67'
|
||||||
implementation 'org.mongodb:mongodb-driver-sync:4.2.1'
|
implementation 'org.mongodb:mongodb-driver-sync:4.2.1'
|
||||||
implementation 'io.projectreactor.netty:reactor-netty:1.0.4'
|
implementation 'io.projectreactor.netty:reactor-netty:1.0.4'
|
||||||
implementation 'com.github.TeamNewPipe:NewPipeExtractor:v0.20.8'
|
implementation 'com.github.TeamNewPipe:NewPipeExtractor:SNAPSHOT'
|
||||||
implementation 'com.github.TeamNewPipe:nanojson:1d9e1aea9049fc9f85e68b43ba39fe7be1c1f751'
|
implementation 'com.github.TeamNewPipe:nanojson:1d9e1aea9049fc9f85e68b43ba39fe7be1c1f751'
|
||||||
implementation 'com.fasterxml.jackson.core:jackson-core:2.12.1'
|
implementation 'com.fasterxml.jackson.core:jackson-core:2.12.1'
|
||||||
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.12.1'
|
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.12.1'
|
||||||
@ -27,6 +27,8 @@ dependencies {
|
|||||||
implementation 'org.json:json:20201115'
|
implementation 'org.json:json:20201115'
|
||||||
implementation 'com.github.ben-manes.caffeine:caffeine:2.8.6'
|
implementation 'com.github.ben-manes.caffeine:caffeine:2.8.6'
|
||||||
implementation 'com.rometools:rome:1.15.0'
|
implementation 'com.rometools:rome:1.15.0'
|
||||||
|
implementation 'com.github.ipfs:java-ipfs-http-client:v1.3.3'
|
||||||
|
implementation 'net.java.dev.jna:jna-platform:5.7.0'
|
||||||
}
|
}
|
||||||
|
|
||||||
shadowJar {
|
shadowJar {
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
package me.kavin.piped;
|
package me.kavin.piped;
|
||||||
|
|
||||||
import io.netty.util.AsciiString;
|
import static io.netty.handler.codec.http.HttpHeaderNames.ACCESS_CONTROL_ALLOW_ORIGIN;
|
||||||
|
import static io.netty.handler.codec.http.HttpHeaderNames.CACHE_CONTROL;
|
||||||
|
import static io.netty.handler.codec.http.HttpHeaderNames.CONTENT_TYPE;
|
||||||
|
import static io.netty.handler.codec.http.HttpHeaderValues.APPLICATION_JSON;
|
||||||
|
import static io.netty.handler.codec.http.HttpHeaderValues.TEXT_PLAIN;
|
||||||
|
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
|
||||||
import org.apache.commons.lang3.exception.ExceptionUtils;
|
import org.apache.commons.lang3.exception.ExceptionUtils;
|
||||||
import org.schabi.newpipe.extractor.NewPipe;
|
import org.schabi.newpipe.extractor.NewPipe;
|
||||||
import org.schabi.newpipe.extractor.localization.Localization;
|
import org.schabi.newpipe.extractor.localization.Localization;
|
||||||
@ -11,6 +18,7 @@ import com.rometools.rome.io.XmlReader;
|
|||||||
|
|
||||||
import io.netty.buffer.ByteBufAllocator;
|
import io.netty.buffer.ByteBufAllocator;
|
||||||
import io.netty.handler.codec.http.QueryStringDecoder;
|
import io.netty.handler.codec.http.QueryStringDecoder;
|
||||||
|
import io.netty.util.AsciiString;
|
||||||
import me.kavin.piped.consts.Constants;
|
import me.kavin.piped.consts.Constants;
|
||||||
import me.kavin.piped.utils.DownloaderImpl;
|
import me.kavin.piped.utils.DownloaderImpl;
|
||||||
import me.kavin.piped.utils.ResponseHelper;
|
import me.kavin.piped.utils.ResponseHelper;
|
||||||
@ -22,11 +30,6 @@ import reactor.netty.NettyOutbound;
|
|||||||
import reactor.netty.http.server.HttpServer;
|
import reactor.netty.http.server.HttpServer;
|
||||||
import reactor.netty.http.server.HttpServerResponse;
|
import reactor.netty.http.server.HttpServerResponse;
|
||||||
|
|
||||||
import java.nio.charset.StandardCharsets;
|
|
||||||
|
|
||||||
import static io.netty.handler.codec.http.HttpHeaderNames.*;
|
|
||||||
import static io.netty.handler.codec.http.HttpHeaderValues.*;
|
|
||||||
|
|
||||||
public class Main {
|
public class Main {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
@ -41,7 +44,8 @@ public class Main {
|
|||||||
QueryStringDecoder query = new QueryStringDecoder(req.uri());
|
QueryStringDecoder query = new QueryStringDecoder(req.uri());
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return writeResponse(res, query.parameters().get("hub.challenge").get(0), TEXT_PLAIN, 200, "private", start);
|
return writeResponse(res, query.parameters().get("hub.challenge").get(0), TEXT_PLAIN, 200,
|
||||||
|
"private", start);
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@ -226,25 +230,31 @@ public class Main {
|
|||||||
server.onDispose().block();
|
server.onDispose().block();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}).bindNow();
|
||||||
|
|
||||||
|
Thread.sleep(Long.MAX_VALUE);
|
||||||
|
}
|
||||||
|
|
||||||
public static NettyOutbound writeResponse(HttpServerResponse res, String resp, int code, String cache, long time) {
|
public static NettyOutbound writeResponse(HttpServerResponse res, String resp, int code, String cache, long time) {
|
||||||
return writeResponse(res, resp, APPLICATION_JSON, code, cache, time);
|
return writeResponse(res, resp, APPLICATION_JSON, code, cache, time);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static NettyOutbound writeResponse(HttpServerResponse res, String resp, AsciiString mimeType, int code, String cache, long time) {
|
public static NettyOutbound writeResponse(HttpServerResponse res, String resp, AsciiString mimeType, int code,
|
||||||
|
String cache, long time) {
|
||||||
return writeResponse(res, resp, mimeType.toString(), code, cache, time);
|
return writeResponse(res, resp, mimeType.toString(), code, cache, time);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static NettyOutbound writeResponse(HttpServerResponse res, String resp, String mimeType, int code, String cache, long time) {
|
public static NettyOutbound writeResponse(HttpServerResponse res, String resp, String mimeType, int code,
|
||||||
|
String cache, long time) {
|
||||||
return writeResponse(res, resp.getBytes(StandardCharsets.UTF_8), mimeType, code, cache, time);
|
return writeResponse(res, resp.getBytes(StandardCharsets.UTF_8), mimeType, code, cache, time);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static NettyOutbound writeResponse(HttpServerResponse res, byte[] resp, int code, String cache, long time) {
|
public static NettyOutbound writeResponse(HttpServerResponse res, byte[] resp, int code, String cache, long time) {
|
||||||
return writeResponse(res, resp, APPLICATION_JSON, code, cache, time);
|
return writeResponse(res, resp, APPLICATION_JSON, code, cache, time);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static NettyOutbound writeResponse(HttpServerResponse res, byte[] resp, AsciiString mimeType, int code, String cache, long time) {
|
public static NettyOutbound writeResponse(HttpServerResponse res, byte[] resp, AsciiString mimeType, int code,
|
||||||
|
String cache, long time) {
|
||||||
return writeResponse(res, resp, mimeType.toString(), code, cache, time);
|
return writeResponse(res, resp, mimeType.toString(), code, cache, time);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -258,13 +268,12 @@ public class Main {
|
|||||||
.sendByteArray(Flux.just(resp));
|
.sendByteArray(Flux.just(resp));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static NettyOutbound writeResponse(HttpServerResponse res, Flux<String> resp, int code, String cache) {
|
public static NettyOutbound writeResponse(HttpServerResponse res, Flux<String> resp, int code, String cache) {
|
||||||
return writeResponse(res, resp, APPLICATION_JSON, code, cache);
|
return writeResponse(res, resp, APPLICATION_JSON, code, cache);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static NettyOutbound writeResponse(HttpServerResponse res, Flux<String> resp, AsciiString mimeType, int code, String cache) {
|
public static NettyOutbound writeResponse(HttpServerResponse res, Flux<String> resp, AsciiString mimeType, int code,
|
||||||
|
String cache) {
|
||||||
return writeResponse(res, resp, mimeType.toString(), code, cache);
|
return writeResponse(res, resp, mimeType.toString(), code, cache);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,6 +10,8 @@ import org.schabi.newpipe.extractor.NewPipe;
|
|||||||
import org.schabi.newpipe.extractor.StreamingService;
|
import org.schabi.newpipe.extractor.StreamingService;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import com.mongodb.client.MongoClient;
|
||||||
|
import com.mongodb.client.MongoClients;
|
||||||
|
|
||||||
public class Constants {
|
public class Constants {
|
||||||
|
|
||||||
@ -27,6 +29,8 @@ public class Constants {
|
|||||||
.version(Version.HTTP_2).build();
|
.version(Version.HTTP_2).build();
|
||||||
// public static final HttpClient h3client = Http3ClientBuilder.newBuilder().followRedirects(Redirect.NORMAL).build();
|
// public static final HttpClient h3client = Http3ClientBuilder.newBuilder().followRedirects(Redirect.NORMAL).build();
|
||||||
|
|
||||||
|
public static final MongoClient mongoClient;
|
||||||
|
|
||||||
public static final ObjectMapper mapper = new ObjectMapper();
|
public static final ObjectMapper mapper = new ObjectMapper();
|
||||||
|
|
||||||
static {
|
static {
|
||||||
@ -37,6 +41,7 @@ public class Constants {
|
|||||||
|
|
||||||
PORT = Integer.parseInt(prop.getProperty("PORT"));
|
PORT = Integer.parseInt(prop.getProperty("PORT"));
|
||||||
PROXY_PART = prop.getProperty("PROXY_PART");
|
PROXY_PART = prop.getProperty("PROXY_PART");
|
||||||
|
mongoClient = MongoClients.create(prop.getProperty("MONGO_URI"));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
|
20
src/main/java/me/kavin/piped/ipfs/IPFS.java
Normal file
20
src/main/java/me/kavin/piped/ipfs/IPFS.java
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
package me.kavin.piped.ipfs;
|
||||||
|
|
||||||
|
import me.kavin.piped.utils.Multithreading;
|
||||||
|
import me.kavin.piped.utils.obj.Channel;
|
||||||
|
|
||||||
|
public class IPFS {
|
||||||
|
|
||||||
|
// private static final io.ipfs.api.IPFS ipfs = new io.ipfs.api.IPFS(new MultiAddress("/ip4/127.0.0.1/tcp/5001"));
|
||||||
|
|
||||||
|
public static void publishData(final Channel channel) {
|
||||||
|
Multithreading.runAsync(() -> {
|
||||||
|
try {
|
||||||
|
// ipfs.pubsub.pub(URLUtils.silentEncode(channel.id),
|
||||||
|
// URLUtils.silentEncode(Constants.mapper.writeValueAsString(channel)));
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
19
src/main/java/me/kavin/piped/utils/Multithreading.java
Normal file
19
src/main/java/me/kavin/piped/utils/Multithreading.java
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
package me.kavin.piped.utils;
|
||||||
|
|
||||||
|
import java.util.concurrent.ExecutorService;
|
||||||
|
import java.util.concurrent.Executors;
|
||||||
|
|
||||||
|
public class Multithreading {
|
||||||
|
|
||||||
|
private static final ExecutorService es = Executors.newFixedThreadPool(16);
|
||||||
|
|
||||||
|
public static void runAsync(final Runnable runnable) {
|
||||||
|
es.submit(runnable);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void runAsyncTimeout(final Runnable runnable) {
|
||||||
|
|
||||||
|
es.submit(runnable);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
7
src/main/java/me/kavin/piped/utils/RegisterRequest.java
Normal file
7
src/main/java/me/kavin/piped/utils/RegisterRequest.java
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
package me.kavin.piped.utils;
|
||||||
|
|
||||||
|
public class RegisterRequest {
|
||||||
|
|
||||||
|
public String username, password;
|
||||||
|
|
||||||
|
}
|
@ -10,7 +10,6 @@ import java.net.http.HttpResponse.BodyHandlers;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.CompletableFuture;
|
import java.util.concurrent.CompletableFuture;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.stream.Stream;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.commons.lang3.exception.ExceptionUtils;
|
import org.apache.commons.lang3.exception.ExceptionUtils;
|
||||||
@ -34,7 +33,9 @@ import com.github.benmanes.caffeine.cache.LoadingCache;
|
|||||||
|
|
||||||
import it.unimi.dsi.fastutil.objects.ObjectArrayList;
|
import it.unimi.dsi.fastutil.objects.ObjectArrayList;
|
||||||
import me.kavin.piped.consts.Constants;
|
import me.kavin.piped.consts.Constants;
|
||||||
|
import me.kavin.piped.ipfs.IPFS;
|
||||||
import me.kavin.piped.utils.obj.Channel;
|
import me.kavin.piped.utils.obj.Channel;
|
||||||
|
import me.kavin.piped.utils.obj.ChapterSegment;
|
||||||
import me.kavin.piped.utils.obj.PipedStream;
|
import me.kavin.piped.utils.obj.PipedStream;
|
||||||
import me.kavin.piped.utils.obj.Playlist;
|
import me.kavin.piped.utils.obj.Playlist;
|
||||||
import me.kavin.piped.utils.obj.SearchResults;
|
import me.kavin.piped.utils.obj.SearchResults;
|
||||||
@ -75,6 +76,7 @@ public class ResponseHelper {
|
|||||||
|
|
||||||
final StreamInfo info = futureStream.get();
|
final StreamInfo info = futureStream.get();
|
||||||
|
|
||||||
|
// System.out.println(Constants.mapper.writeValueAsString(info.getStreamSegments()));
|
||||||
info.getSubtitles().forEach(subtitle -> subtitles
|
info.getSubtitles().forEach(subtitle -> subtitles
|
||||||
.add(new Subtitle(rewriteURL(subtitle.getUrl()), subtitle.getFormat().getMimeType())));
|
.add(new Subtitle(rewriteURL(subtitle.getUrl()), subtitle.getFormat().getMimeType())));
|
||||||
|
|
||||||
@ -114,19 +116,20 @@ public class ResponseHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!livestream) {
|
if (!livestream) {
|
||||||
info.getVideoOnlyStreams()
|
info.getVideoOnlyStreams().forEach(stream -> videoStreams.add(new PipedStream(rewriteURL(stream.getUrl()),
|
||||||
.forEach(stream -> videoStreams
|
String.valueOf(stream.getFormat()), stream.getResolution(), stream.getFormat().getMimeType(), true,
|
||||||
.add(new PipedStream(rewriteURL(stream.getUrl()), String.valueOf(stream.getFormat()),
|
stream.getBitrate(), stream.getInitStart(), stream.getInitEnd(), stream.getIndexStart(),
|
||||||
stream.getResolution(), stream.getFormat().getMimeType(), true)));
|
stream.getIndexEnd(), stream.getCodec(), stream.getWidth(), stream.getHeight(), 30)));
|
||||||
info.getVideoStreams()
|
info.getVideoStreams()
|
||||||
.forEach(stream -> videoStreams
|
.forEach(stream -> videoStreams
|
||||||
.add(new PipedStream(rewriteURL(stream.getUrl()), String.valueOf(stream.getFormat()),
|
.add(new PipedStream(rewriteURL(stream.getUrl()), String.valueOf(stream.getFormat()),
|
||||||
stream.getResolution(), stream.getFormat().getMimeType(), false)));
|
stream.getResolution(), stream.getFormat().getMimeType(), false)));
|
||||||
|
|
||||||
info.getAudioStreams()
|
info.getAudioStreams()
|
||||||
.forEach(stream -> audioStreams
|
.forEach(stream -> audioStreams.add(new PipedStream(rewriteURL(stream.getUrl()),
|
||||||
.add(new PipedStream(rewriteURL(stream.getUrl()), String.valueOf(stream.getFormat()),
|
String.valueOf(stream.getFormat()), stream.getAverageBitrate() + " kbps",
|
||||||
stream.getAverageBitrate() + " kbps", stream.getFormat().getMimeType(), false)));
|
stream.getFormat().getMimeType(), false, stream.getBitrate(), stream.getInitStart(),
|
||||||
|
stream.getInitEnd(), stream.getIndexStart(), stream.getIndexEnd(), stream.getCodec())));
|
||||||
}
|
}
|
||||||
|
|
||||||
final List<StreamItem> relatedStreams = new ObjectArrayList<>();
|
final List<StreamItem> relatedStreams = new ObjectArrayList<>();
|
||||||
@ -138,6 +141,11 @@ public class ResponseHelper {
|
|||||||
item.getTextualUploadDate(), item.getDuration(), item.getViewCount()));
|
item.getTextualUploadDate(), item.getDuration(), item.getViewCount()));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
List<ChapterSegment> segments = new ObjectArrayList<>();
|
||||||
|
|
||||||
|
info.getStreamSegments().forEach(
|
||||||
|
segment -> segments.add(new ChapterSegment(segment.getTitle(), segment.getStartTimeSeconds())));
|
||||||
|
|
||||||
final Streams streams = new Streams(info.getName(), info.getDescription().getContent(),
|
final Streams streams = new Streams(info.getName(), info.getDescription().getContent(),
|
||||||
info.getTextualUploadDate(), info.getUploaderName(), info.getUploaderUrl().substring(23),
|
info.getTextualUploadDate(), info.getUploaderName(), info.getUploaderUrl().substring(23),
|
||||||
rewriteURL(info.getUploaderAvatarUrl()), rewriteURL(info.getThumbnailUrl()), info.getDuration(),
|
rewriteURL(info.getUploaderAvatarUrl()), rewriteURL(info.getThumbnailUrl()), info.getDuration(),
|
||||||
@ -148,8 +156,7 @@ public class ResponseHelper {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final byte[] channelResponse(String channelId)
|
public static final byte[] channelResponse(String channelId) throws Exception {
|
||||||
throws IOException, ExtractionException, InterruptedException {
|
|
||||||
|
|
||||||
final ChannelInfo info = ChannelInfo.getInfo("https://youtube.com/channel/" + channelId);
|
final ChannelInfo info = ChannelInfo.getInfo("https://youtube.com/channel/" + channelId);
|
||||||
|
|
||||||
@ -164,9 +171,11 @@ public class ResponseHelper {
|
|||||||
|
|
||||||
String nextpage = info.hasNextPage() ? info.getNextPage().getUrl() : null;
|
String nextpage = info.hasNextPage() ? info.getNextPage().getUrl() : null;
|
||||||
|
|
||||||
final Channel channel = new Channel(info.getName(), rewriteURL(info.getAvatarUrl()),
|
final Channel channel = new Channel(info.getId(), info.getName(), rewriteURL(info.getAvatarUrl()),
|
||||||
rewriteURL(info.getBannerUrl()), info.getDescription(), nextpage, relatedStreams);
|
rewriteURL(info.getBannerUrl()), info.getDescription(), nextpage, relatedStreams);
|
||||||
|
|
||||||
|
IPFS.publishData(channel);
|
||||||
|
|
||||||
return Constants.mapper.writeValueAsBytes(channel);
|
return Constants.mapper.writeValueAsBytes(channel);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -4,11 +4,12 @@ import java.util.List;
|
|||||||
|
|
||||||
public class Channel {
|
public class Channel {
|
||||||
|
|
||||||
public String name, avatarUrl, bannerUrl, description, nextpage;
|
public String id, name, avatarUrl, bannerUrl, description, nextpage;
|
||||||
public List<StreamItem> relatedStreams;
|
public List<StreamItem> relatedStreams;
|
||||||
|
|
||||||
public Channel(String name, String avatarUrl, String bannerUrl, String description, String nextpage,
|
public Channel(String id, String name, String avatarUrl, String bannerUrl, String description, String nextpage,
|
||||||
List<StreamItem> relatedStreams) {
|
List<StreamItem> relatedStreams) {
|
||||||
|
this.id = id;
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.avatarUrl = avatarUrl;
|
this.avatarUrl = avatarUrl;
|
||||||
this.bannerUrl = bannerUrl;
|
this.bannerUrl = bannerUrl;
|
||||||
|
12
src/main/java/me/kavin/piped/utils/obj/ChapterSegment.java
Normal file
12
src/main/java/me/kavin/piped/utils/obj/ChapterSegment.java
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
package me.kavin.piped.utils.obj;
|
||||||
|
|
||||||
|
public class ChapterSegment {
|
||||||
|
|
||||||
|
public String title;
|
||||||
|
public int start;
|
||||||
|
|
||||||
|
public ChapterSegment(String title, int start) {
|
||||||
|
this.title = title;
|
||||||
|
this.start = start;
|
||||||
|
}
|
||||||
|
}
|
@ -2,9 +2,11 @@ package me.kavin.piped.utils.obj;
|
|||||||
|
|
||||||
public class PipedStream {
|
public class PipedStream {
|
||||||
|
|
||||||
public String url, format, quality, mimeType;
|
public String url, format, quality, mimeType, codec;
|
||||||
public boolean videoOnly;
|
public boolean videoOnly;
|
||||||
|
|
||||||
|
public int bitrate, initStart, initEnd, indexStart, indexEnd, width, height, fps;
|
||||||
|
|
||||||
public PipedStream(String url, String format, String quality, String mimeType, boolean videoOnly) {
|
public PipedStream(String url, String format, String quality, String mimeType, boolean videoOnly) {
|
||||||
this.url = url;
|
this.url = url;
|
||||||
this.format = format;
|
this.format = format;
|
||||||
@ -12,4 +14,37 @@ public class PipedStream {
|
|||||||
this.mimeType = mimeType;
|
this.mimeType = mimeType;
|
||||||
this.videoOnly = videoOnly;
|
this.videoOnly = videoOnly;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public PipedStream(String url, String format, String quality, String mimeType, boolean videoOnly, int bitrate,
|
||||||
|
int initStart, int initEnd, int indexStart, int indexEnd, String codec) {
|
||||||
|
this.url = url;
|
||||||
|
this.format = format;
|
||||||
|
this.quality = quality;
|
||||||
|
this.mimeType = mimeType;
|
||||||
|
this.videoOnly = videoOnly;
|
||||||
|
this.bitrate = bitrate;
|
||||||
|
this.initStart = initStart;
|
||||||
|
this.initEnd = initEnd;
|
||||||
|
this.indexStart = indexStart;
|
||||||
|
this.indexEnd = indexEnd;
|
||||||
|
this.codec = codec;
|
||||||
|
}
|
||||||
|
|
||||||
|
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) {
|
||||||
|
this.url = url;
|
||||||
|
this.format = format;
|
||||||
|
this.quality = quality;
|
||||||
|
this.mimeType = mimeType;
|
||||||
|
this.videoOnly = videoOnly;
|
||||||
|
this.bitrate = bitrate;
|
||||||
|
this.initStart = initStart;
|
||||||
|
this.initEnd = initEnd;
|
||||||
|
this.indexStart = indexStart;
|
||||||
|
this.indexEnd = indexEnd;
|
||||||
|
this.codec = codec;
|
||||||
|
this.width = width;
|
||||||
|
this.height = height;
|
||||||
|
this.fps = fps;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user