mirror of
https://github.com/TeamPiped/Piped-Backend.git
synced 2024-12-14 14:20:29 +05:30
Merge pull request #367 from TeamPiped/npe-executor
Let NewPipeExtractor use same executor.
This commit is contained in:
commit
9a45da45f2
@ -9,22 +9,20 @@ import me.kavin.piped.utils.obj.db.*;
|
|||||||
import org.hibernate.Session;
|
import org.hibernate.Session;
|
||||||
import org.hibernate.StatelessSession;
|
import org.hibernate.StatelessSession;
|
||||||
import org.schabi.newpipe.extractor.NewPipe;
|
import org.schabi.newpipe.extractor.NewPipe;
|
||||||
|
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.YoutubeThrottlingDecrypter;
|
import org.schabi.newpipe.extractor.services.youtube.YoutubeThrottlingDecrypter;
|
||||||
import org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeStreamExtractor;
|
import org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeStreamExtractor;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Collections;
|
import java.util.*;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Timer;
|
|
||||||
import java.util.TimerTask;
|
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
public class Main {
|
public class Main {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
|
|
||||||
NewPipe.init(new DownloaderImpl(), new Localization("en", "US"));
|
NewPipe.init(new DownloaderImpl(), new Localization("en", "US"), ContentCountry.DEFAULT, Multithreading.getCachedExecutor());
|
||||||
YoutubeStreamExtractor.forceFetchAndroidClient(true);
|
YoutubeStreamExtractor.forceFetchAndroidClient(true);
|
||||||
YoutubeStreamExtractor.forceFetchIosClient(true);
|
YoutubeStreamExtractor.forceFetchIosClient(true);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user