mirror of
https://github.com/TeamPiped/Piped-Backend.git
synced 2024-08-14 23:51:41 +00:00
Merge pull request #367 from TeamPiped/npe-executor
Let NewPipeExtractor use same executor.
This commit is contained in:
commit
9a45da45f2
1 changed files with 3 additions and 5 deletions
|
@ -9,22 +9,20 @@ import me.kavin.piped.utils.obj.db.*;
|
|||
import org.hibernate.Session;
|
||||
import org.hibernate.StatelessSession;
|
||||
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.services.youtube.YoutubeThrottlingDecrypter;
|
||||
import org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeStreamExtractor;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
public class Main {
|
||||
|
||||
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.forceFetchIosClient(true);
|
||||
|
||||
|
|
Loading…
Reference in a new issue