diff options
author | Daniel Oeh <daniel@danielpc.(none)> | 2012-05-28 13:22:23 +0200 |
---|---|---|
committer | Daniel Oeh <daniel@danielpc.(none)> | 2012-05-28 13:22:23 +0200 |
commit | 0cecd8255082ef32908dc9b1440b15218aca3e66 (patch) | |
tree | 7cdd0ef24ddf44b50ff53da21f4c021dd048ab9e /src/de/podfetcher/storage | |
parent | 4caa46e03f16a3dcbc8e8fe383c4d64ed533980a (diff) | |
download | AntennaPod-0cecd8255082ef32908dc9b1440b15218aca3e66.zip |
Implemented FeedMedia Download
Diffstat (limited to 'src/de/podfetcher/storage')
-rw-r--r-- | src/de/podfetcher/storage/DownloadRequester.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/de/podfetcher/storage/DownloadRequester.java b/src/de/podfetcher/storage/DownloadRequester.java index 3c44bd427..c10b15a92 100644 --- a/src/de/podfetcher/storage/DownloadRequester.java +++ b/src/de/podfetcher/storage/DownloadRequester.java @@ -87,7 +87,7 @@ public class DownloadRequester { public void downloadMedia(Context context, FeedMedia feedmedia) { download(context, media, feedmedia, - new File(context.getExternalFilesDir(MEDIA_DOWNLOADPATH), "media-" + media.size()), + new File(getMediafilePath(context, feedmedia), getMediafilename(feedmedia)), true); } @@ -183,6 +183,14 @@ public class DownloadRequester { return "image-" + NumberGenerator.generateLong(image.getDownload_url()); } + public String getMediafilePath(Context context, FeedMedia media) { + return context.getExternalFilesDir(MEDIA_DOWNLOADPATH).toString() + "/"; + } + + public String getMediafilename(FeedMedia media) { + return "media-" + NumberGenerator.generateLong(media.getDownload_url()); + } + /* ------------ Methods for communicating with the DownloadService ------------- */ private Messenger mService = null; |