Fixed dir settings
This commit is contained in:
parent
0156a4f39e
commit
6940021293
6 changed files with 50 additions and 120 deletions
|
|
@ -5,6 +5,8 @@ import android.util.Log;
|
|||
|
||||
import com.google.gson.Gson;
|
||||
|
||||
import org.schabi.newpipe.NewPipeSettings;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.RandomAccessFile;
|
||||
import java.net.HttpURLConnection;
|
||||
|
|
@ -33,7 +35,7 @@ public class DownloadManagerImpl implements DownloadManager
|
|||
DownloadMission mission = new DownloadMission();
|
||||
mission.url = url;
|
||||
mission.name = name;
|
||||
mission.location = mLocation;
|
||||
mission.location = NewPipeSettings.getDownloadPath(mContext, name);
|
||||
mission.timestamp = System.currentTimeMillis();
|
||||
mission.threadCount = threads;
|
||||
new Initializer(mContext, mission).start();
|
||||
|
|
@ -64,7 +66,7 @@ public class DownloadManagerImpl implements DownloadManager
|
|||
|
||||
private void loadMissions() {
|
||||
File f = new File(mLocation);
|
||||
|
||||
|
||||
if (f.exists() && f.isDirectory()) {
|
||||
File[] subs = f.listFiles();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue