set autodownload == false once an item is downloaded
This commit is contained in:
parent
25d19e9be8
commit
20ab6ec260
@ -1171,12 +1171,16 @@ public class DownloadService extends Service {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (chaptersRead) {
|
// we've received the media, we don't want to autodownload it again
|
||||||
DBWriter.setFeedItem(DownloadService.this, media.getItem()).get();
|
FeedItem item = media.getItem();
|
||||||
}
|
item.setAutoDownload(false);
|
||||||
|
|
||||||
|
// update the db
|
||||||
|
DBWriter.setFeedItem(DownloadService.this, item).get();
|
||||||
|
|
||||||
DBWriter.setFeedMedia(DownloadService.this, media).get();
|
DBWriter.setFeedMedia(DownloadService.this, media).get();
|
||||||
if (!DBTasks.isInQueue(DownloadService.this, media.getItem().getId())) {
|
if (!DBTasks.isInQueue(DownloadService.this, item.getId())) {
|
||||||
DBWriter.addQueueItem(DownloadService.this, media.getItem().getId()).get();
|
DBWriter.addQueueItem(DownloadService.this, item.getId()).get();
|
||||||
}
|
}
|
||||||
} catch (ExecutionException e) {
|
} catch (ExecutionException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user