diff options
author | ByteHamster <ByteHamster@users.noreply.github.com> | 2022-03-16 22:44:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-16 22:44:39 +0100 |
commit | 60e2c2e113e7313f9d3026d20bf595473a5667c1 (patch) | |
tree | 04518d0fc9f94a2adce93480046c2dd302d76076 /app/src/main/java/de/danoeh/antennapod | |
parent | 5df02d7b1969ac2093045551c76371e7113ff610 (diff) | |
parent | c60ba6a6f78f0e7ce61cfcf0930f42830e41ab47 (diff) | |
download | AntennaPod-60e2c2e113e7313f9d3026d20bf595473a5667c1.zip |
Merge pull request #5786 from ByteHamster/subscribe-filename
Use data folder for initial subscriptions
Diffstat (limited to 'app/src/main/java/de/danoeh/antennapod')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/activity/OnlineFeedViewActivity.java | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/activity/OnlineFeedViewActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/OnlineFeedViewActivity.java index 277cdf6aa..3f01a2b2d 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/OnlineFeedViewActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/OnlineFeedViewActivity.java @@ -50,7 +50,6 @@ import de.danoeh.antennapod.core.service.download.HttpDownloader; import de.danoeh.antennapod.core.service.playback.PlaybackService; import de.danoeh.antennapod.core.storage.DBReader; import de.danoeh.antennapod.core.storage.DBWriter; -import de.danoeh.antennapod.core.util.FileNameGenerator; import de.danoeh.antennapod.parser.feed.FeedHandler; import de.danoeh.antennapod.parser.feed.FeedHandlerResult; import de.danoeh.antennapod.core.util.DownloadError; @@ -291,12 +290,11 @@ public class OnlineFeedViewActivity extends AppCompatActivity { Log.d(TAG, "Starting feed download"); url = URLChecker.prepareURL(url); feed = new Feed(url, null); - String fileUrl = new File(getExternalCacheDir(), - FileNameGenerator.generateFileName(feed.getDownload_url())).toString(); - feed.setFile_url(fileUrl); - final DownloadRequest request = new DownloadRequest(feed.getFile_url(), - feed.getDownload_url(), "OnlineFeed", 0, Feed.FEEDFILETYPE_FEED, username, password, - true, null, true); + DownloadRequest request = DownloadRequestCreator.create(feed) + .withAuthentication(username, password) + .withInitiatedByUser(true) + .build(); + feed.setFile_url(request.getDestination()); download = Observable.fromCallable(() -> { feeds = DBReader.getFeedList(); |