From d92de110dfecb18718aa0e4cc469f1c215dcd6d4 Mon Sep 17 00:00:00 2001 From: Daniel Oeh Date: Wed, 30 May 2012 13:43:28 +0200 Subject: Changed Download path of FeedMedia --- src/de/podfetcher/storage/DownloadRequester.java | 6 ++++-- 1 file 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()); } -- cgit v1.2.3