Use new Localization and Downloader implementations from extractor
This commit is contained in:
parent
577bfab366
commit
71f1bbdcc1
20 changed files with 260 additions and 394 deletions
|
|
@ -5,7 +5,7 @@ import android.util.Log;
|
|||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import org.schabi.newpipe.Downloader;
|
||||
import org.schabi.newpipe.DownloaderImpl;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
|
|
@ -212,7 +212,7 @@ public class DownloadMission extends Mission {
|
|||
HttpURLConnection openConnection(String url, int threadId, long rangeStart, long rangeEnd) throws IOException {
|
||||
HttpURLConnection conn = (HttpURLConnection) new URL(url).openConnection();
|
||||
conn.setInstanceFollowRedirects(true);
|
||||
conn.setRequestProperty("User-Agent", Downloader.USER_AGENT);
|
||||
conn.setRequestProperty("User-Agent", DownloaderImpl.USER_AGENT);
|
||||
conn.setRequestProperty("Accept", "*/*");
|
||||
|
||||
// BUG workaround: switching between networks can freeze the download forever
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue