From b76ab8053cf19f4876aa3074e20eb7803ede7fa2 Mon Sep 17 00:00:00 2001 From: daniel oeh Date: Wed, 3 Oct 2012 15:05:30 +0200 Subject: [PATCH] PlaybackService now adds completed items to the playbackhistory --- src/de/danoeh/antennapod/service/PlaybackService.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/de/danoeh/antennapod/service/PlaybackService.java b/src/de/danoeh/antennapod/service/PlaybackService.java index f4e5fb93f..f184404b3 100644 --- a/src/de/danoeh/antennapod/service/PlaybackService.java +++ b/src/de/danoeh/antennapod/service/PlaybackService.java @@ -1,6 +1,7 @@ package de.danoeh.antennapod.service; import java.io.IOException; +import java.util.Date; import java.util.concurrent.Future; import java.util.concurrent.RejectedExecutionHandler; import java.util.concurrent.ScheduledFuture; @@ -653,13 +654,15 @@ public class PlaybackService extends Service { // Save state cancelPositionSaver(); media.setPosition(0); + media.setPlaybackCompletionDate(new Date()); manager.markItemRead(PlaybackService.this, media.getItem(), true); boolean isInQueue = manager.isInQueue(media.getItem()); if (isInQueue) { manager.removeQueueItem(PlaybackService.this, media.getItem()); } + manager.addItemToPlaybackHistory(PlaybackService.this, media.getItem()); manager.setFeedMedia(PlaybackService.this, media); - + long autoDeleteMediaId = media.getId(); if (shouldStream) {