diff options
author | daniel oeh <daniel.oeh@gmail.com> | 2013-03-12 11:16:40 +0100 |
---|---|---|
committer | daniel oeh <daniel.oeh@gmail.com> | 2013-03-12 11:16:40 +0100 |
commit | 86f12ad3c74163253c009aa5579356300f1c63b1 (patch) | |
tree | 778a239d1651921a57875801b2d680af9c1d46ed /src | |
parent | cdf73fd1f7121cd2333b0b1819c56e797f15666f (diff) | |
download | AntennaPod-86f12ad3c74163253c009aa5579356300f1c63b1.zip |
Ignore first queue item when downloading
Diffstat (limited to 'src')
-rw-r--r-- | src/de/danoeh/antennapod/feed/FeedManager.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/de/danoeh/antennapod/feed/FeedManager.java b/src/de/danoeh/antennapod/feed/FeedManager.java index 51d8e194f..e5de32f59 100644 --- a/src/de/danoeh/antennapod/feed/FeedManager.java +++ b/src/de/danoeh/antennapod/feed/FeedManager.java @@ -621,6 +621,9 @@ public class FeedManager { * This method will try to download undownloaded items in the queue or the * unread items list. If not enough space is available, an episode cleanup * will be performed first. + * + * This method assumes that the item that is currently being played is at + * index 0 in the queue and therefore will not try to download it. */ public void autodownloadUndownloadedItems(Context context) { if (AppConfig.DEBUG) @@ -639,7 +642,9 @@ public class FeedManager { List<FeedItem> itemsToDownload = new ArrayList<FeedItem>(); if (episodeSpaceLeft > 0 && undownloadedEpisodes > 0) { - for (FeedItem item : queue) { + for (int i = 1; i < queue.size(); i++) { // ignore first item in + // queue + FeedItem item = queue.get(i); if (item.hasMedia() && !item.getMedia().isDownloaded()) { itemsToDownload.add(item); episodeSpaceLeft--; |