diff options
Diffstat (limited to 'core/src/main/java')
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/storage/DBReader.java | 4 | ||||
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/storage/StatisticsItem.java | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/storage/DBReader.java b/core/src/main/java/de/danoeh/antennapod/core/storage/DBReader.java index c8368506b..fd8ca116d 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/storage/DBReader.java +++ b/core/src/main/java/de/danoeh/antennapod/core/storage/DBReader.java @@ -746,6 +746,7 @@ public final class DBReader { long episodesStarted = 0; long episodesStartedIncludingMarked = 0; long totalDownloadSize = 0; + long episodesDownloadCount = 0; List<FeedItem> items = getFeed(feed.getId()).getItems(); for (FeedItem item : items) { FeedMedia media = item.getMedia(); @@ -773,13 +774,14 @@ public final class DBReader { if (media.isDownloaded()) { totalDownloadSize = totalDownloadSize + media.getSize(); + episodesDownloadCount++; } episodes++; } feedTime.add(new StatisticsItem( feed, feedTotalTime, feedPlayedTime, feedPlayedTimeCountAll, episodes, - episodesStarted, episodesStartedIncludingMarked, totalDownloadSize)); + episodesStarted, episodesStartedIncludingMarked, totalDownloadSize, episodesDownloadCount)); } adapter.close(); diff --git a/core/src/main/java/de/danoeh/antennapod/core/storage/StatisticsItem.java b/core/src/main/java/de/danoeh/antennapod/core/storage/StatisticsItem.java index f96af185b..18a5403a7 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/storage/StatisticsItem.java +++ b/core/src/main/java/de/danoeh/antennapod/core/storage/StatisticsItem.java @@ -36,9 +36,14 @@ public class StatisticsItem { */ public final long totalDownloadSize; + /** + * Stores the number of episodes downloaded. + */ + public final long episodesDownloadCount; + public StatisticsItem(Feed feed, long time, long timePlayed, long timePlayedCountAll, long episodes, long episodesStarted, long episodesStartedIncludingMarked, - long totalDownloadSize) { + long totalDownloadSize, long episodesDownloadCount) { this.feed = feed; this.time = time; this.timePlayed = timePlayed; @@ -47,5 +52,6 @@ public class StatisticsItem { this.episodesStarted = episodesStarted; this.episodesStartedIncludingMarked = episodesStartedIncludingMarked; this.totalDownloadSize = totalDownloadSize; + this.episodesDownloadCount = episodesDownloadCount; } } |