mirror of
https://github.com/AntennaPod/AntennaPod.git
synced 2025-12-01 12:31:45 +00:00
Changed Download path of FeedMedia
This commit is contained in:
@ -21,6 +21,7 @@ import android.content.ComponentName;
|
|||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
import android.os.RemoteException;
|
import android.os.RemoteException;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.webkit.URLUtil;
|
||||||
|
|
||||||
public class DownloadRequester {
|
public class DownloadRequester {
|
||||||
private static final String TAG = "DownloadRequester";
|
private static final String TAG = "DownloadRequester";
|
||||||
@ -184,11 +185,12 @@ public class DownloadRequester {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String getMediafilePath(Context context, FeedMedia media) {
|
public String getMediafilePath(Context context, FeedMedia media) {
|
||||||
return context.getExternalFilesDir(MEDIA_DOWNLOADPATH).toString() + "/";
|
return context.getExternalFilesDir(MEDIA_DOWNLOADPATH
|
||||||
|
+ media.getItem().getFeed().getTitle() + "/").toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getMediafilename(FeedMedia media) {
|
public String getMediafilename(FeedMedia media) {
|
||||||
return "media-" + NumberGenerator.generateLong(media.getDownload_url());
|
return URLUtil.guessFileName(media.getDownload_url(), null, media.getMime_type());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user