mirror of
https://github.com/TeamPiped/Piped-Backend.git
synced 2024-12-12 21:30:29 +05:30
Enable sending consent cookie.
This commit is contained in:
parent
79ff0404e8
commit
bae104a03b
@ -56,6 +56,10 @@ DISABLE_LBRY:false
|
|||||||
# How long should unauthenticated subscriptions last for
|
# How long should unauthenticated subscriptions last for
|
||||||
SUBSCRIPTIONS_EXPIRY:30
|
SUBSCRIPTIONS_EXPIRY:30
|
||||||
|
|
||||||
|
# Send consent accepted cookie
|
||||||
|
# This is required for certain features to work in some countries
|
||||||
|
CONSENT_COOKIE:true
|
||||||
|
|
||||||
# Sentry DSN
|
# Sentry DSN
|
||||||
# Use Sentry to log errors and trace performance
|
# Use Sentry to log errors and trace performance
|
||||||
#SENTRY_DSN:INSERT_HERE
|
#SENTRY_DSN:INSERT_HERE
|
||||||
|
@ -20,6 +20,7 @@ import org.schabi.newpipe.extractor.NewPipe;
|
|||||||
import org.schabi.newpipe.extractor.localization.ContentCountry;
|
import org.schabi.newpipe.extractor.localization.ContentCountry;
|
||||||
import org.schabi.newpipe.extractor.localization.Localization;
|
import org.schabi.newpipe.extractor.localization.Localization;
|
||||||
import org.schabi.newpipe.extractor.services.youtube.YoutubeJavaScriptPlayerManager;
|
import org.schabi.newpipe.extractor.services.youtube.YoutubeJavaScriptPlayerManager;
|
||||||
|
import org.schabi.newpipe.extractor.services.youtube.YoutubeParsingHelper;
|
||||||
import org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeStreamExtractor;
|
import org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeStreamExtractor;
|
||||||
import org.schabi.newpipe.extractor.stream.StreamInfo;
|
import org.schabi.newpipe.extractor.stream.StreamInfo;
|
||||||
import rocks.kavin.reqwest4j.ReqwestUtils;
|
import rocks.kavin.reqwest4j.ReqwestUtils;
|
||||||
@ -46,6 +47,7 @@ public class Main {
|
|||||||
NewPipe.init(new DownloaderImpl(), new Localization("en", "US"), ContentCountry.DEFAULT, Multithreading.getCachedExecutor());
|
NewPipe.init(new DownloaderImpl(), new Localization("en", "US"), ContentCountry.DEFAULT, Multithreading.getCachedExecutor());
|
||||||
YoutubeStreamExtractor.forceFetchAndroidClient(true);
|
YoutubeStreamExtractor.forceFetchAndroidClient(true);
|
||||||
YoutubeStreamExtractor.forceFetchIosClient(true);
|
YoutubeStreamExtractor.forceFetchIosClient(true);
|
||||||
|
YoutubeParsingHelper.setConsentAccepted(CONSENT_COOKIE);
|
||||||
|
|
||||||
// Warm up the extractor
|
// Warm up the extractor
|
||||||
try {
|
try {
|
||||||
|
@ -83,6 +83,8 @@ public class Constants {
|
|||||||
|
|
||||||
public static final int SUBSCRIPTIONS_EXPIRY;
|
public static final int SUBSCRIPTIONS_EXPIRY;
|
||||||
|
|
||||||
|
public static final boolean CONSENT_COOKIE;
|
||||||
|
|
||||||
public static final String SENTRY_DSN;
|
public static final String SENTRY_DSN;
|
||||||
|
|
||||||
public static final String S3_ENDPOINT;
|
public static final String S3_ENDPOINT;
|
||||||
@ -152,6 +154,7 @@ public class Constants {
|
|||||||
DISABLE_SERVER = Boolean.parseBoolean(getProperty(prop, "DISABLE_SERVER", "false"));
|
DISABLE_SERVER = Boolean.parseBoolean(getProperty(prop, "DISABLE_SERVER", "false"));
|
||||||
DISABLE_LBRY = Boolean.parseBoolean(getProperty(prop, "DISABLE_LBRY", "false"));
|
DISABLE_LBRY = Boolean.parseBoolean(getProperty(prop, "DISABLE_LBRY", "false"));
|
||||||
SUBSCRIPTIONS_EXPIRY = Integer.parseInt(getProperty(prop, "SUBSCRIPTIONS_EXPIRY", "30"));
|
SUBSCRIPTIONS_EXPIRY = Integer.parseInt(getProperty(prop, "SUBSCRIPTIONS_EXPIRY", "30"));
|
||||||
|
CONSENT_COOKIE = Boolean.parseBoolean(getProperty(prop, "CONSENT_COOKIE", "true"));
|
||||||
SENTRY_DSN = getProperty(prop, "SENTRY_DSN", "");
|
SENTRY_DSN = getProperty(prop, "SENTRY_DSN", "");
|
||||||
S3_ENDPOINT = getProperty(prop, "S3_ENDPOINT");
|
S3_ENDPOINT = getProperty(prop, "S3_ENDPOINT");
|
||||||
S3_ACCESS_KEY = getProperty(prop, "S3_ACCESS_KEY");
|
S3_ACCESS_KEY = getProperty(prop, "S3_ACCESS_KEY");
|
||||||
|
Loading…
Reference in New Issue
Block a user