PlaybackService now adds completed items to the playbackhistory
This commit is contained in:
parent
0b5fa1c612
commit
b76ab8053c
|
@ -1,6 +1,7 @@
|
||||||
package de.danoeh.antennapod.service;
|
package de.danoeh.antennapod.service;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.concurrent.Future;
|
import java.util.concurrent.Future;
|
||||||
import java.util.concurrent.RejectedExecutionHandler;
|
import java.util.concurrent.RejectedExecutionHandler;
|
||||||
import java.util.concurrent.ScheduledFuture;
|
import java.util.concurrent.ScheduledFuture;
|
||||||
|
@ -653,13 +654,15 @@ public class PlaybackService extends Service {
|
||||||
// Save state
|
// Save state
|
||||||
cancelPositionSaver();
|
cancelPositionSaver();
|
||||||
media.setPosition(0);
|
media.setPosition(0);
|
||||||
|
media.setPlaybackCompletionDate(new Date());
|
||||||
manager.markItemRead(PlaybackService.this, media.getItem(), true);
|
manager.markItemRead(PlaybackService.this, media.getItem(), true);
|
||||||
boolean isInQueue = manager.isInQueue(media.getItem());
|
boolean isInQueue = manager.isInQueue(media.getItem());
|
||||||
if (isInQueue) {
|
if (isInQueue) {
|
||||||
manager.removeQueueItem(PlaybackService.this, media.getItem());
|
manager.removeQueueItem(PlaybackService.this, media.getItem());
|
||||||
}
|
}
|
||||||
|
manager.addItemToPlaybackHistory(PlaybackService.this, media.getItem());
|
||||||
manager.setFeedMedia(PlaybackService.this, media);
|
manager.setFeedMedia(PlaybackService.this, media);
|
||||||
|
|
||||||
long autoDeleteMediaId = media.getId();
|
long autoDeleteMediaId = media.getId();
|
||||||
|
|
||||||
if (shouldStream) {
|
if (shouldStream) {
|
||||||
|
|
Loading…
Reference in New Issue