diff options
author | Daniel Oeh <daniel@danielpc.(none)> | 2012-05-30 13:43:28 +0200 |
---|---|---|
committer | Daniel Oeh <daniel@danielpc.(none)> | 2012-05-30 13:43:28 +0200 |
commit | d92de110dfecb18718aa0e4cc469f1c215dcd6d4 (patch) | |
tree | a6513362d0cc5cbd2f0b8059aa638ce9de1dc948 | |
parent | 06b0d761fd0089529318ad48e274a7a84581016b (diff) | |
download | AntennaPod-d92de110dfecb18718aa0e4cc469f1c215dcd6d4.zip |
Changed Download path of FeedMedia
-rw-r--r-- | src/de/podfetcher/storage/DownloadRequester.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/de/podfetcher/storage/DownloadRequester.java b/src/de/podfetcher/storage/DownloadRequester.java index c10b15a92..f7ed29df2 100644 --- a/src/de/podfetcher/storage/DownloadRequester.java +++ b/src/de/podfetcher/storage/DownloadRequester.java @@ -21,6 +21,7 @@ import android.content.ComponentName; import android.os.Message; import android.os.RemoteException; import android.content.Intent; +import android.webkit.URLUtil; public class DownloadRequester { private static final String TAG = "DownloadRequester"; @@ -184,11 +185,12 @@ public class DownloadRequester { } 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) { - return "media-" + NumberGenerator.generateLong(media.getDownload_url()); + return URLUtil.guessFileName(media.getDownload_url(), null, media.getMime_type()); } |