Search in sources :

Example 6 with FeedListUpdateEvent

use of de.danoeh.antennapod.event.FeedListUpdateEvent in project AntennaPod by AntennaPod.

the class DBWriter method setFeedLastUpdateFailed.

/**
 * Saves if a feed's last update failed
 *
 * @param lastUpdateFailed true if last update failed
 */
public static Future<?> setFeedLastUpdateFailed(final long feedId, final boolean lastUpdateFailed) {
    return dbExec.submit(() -> {
        PodDBAdapter adapter = PodDBAdapter.getInstance();
        adapter.open();
        adapter.setFeedLastUpdateFailed(feedId, lastUpdateFailed);
        adapter.close();
        EventBus.getDefault().post(new FeedListUpdateEvent(feedId));
    });
}
Also used : FeedListUpdateEvent(de.danoeh.antennapod.event.FeedListUpdateEvent)

Aggregations

FeedListUpdateEvent (de.danoeh.antennapod.event.FeedListUpdateEvent)6 Feed (de.danoeh.antennapod.model.feed.Feed)3 FeedItem (de.danoeh.antennapod.model.feed.FeedItem)2 ArrayList (java.util.ArrayList)2 Date (java.util.Date)2 DownloadStatus (de.danoeh.antennapod.core.service.download.DownloadStatus)1 PodDBAdapter (de.danoeh.antennapod.core.storage.PodDBAdapter)1 FeedItemPubdateComparator (de.danoeh.antennapod.core.util.comparator.FeedItemPubdateComparator)1 FeedMedia (de.danoeh.antennapod.model.feed.FeedMedia)1 EpisodeAction (de.danoeh.antennapod.net.sync.model.EpisodeAction)1 ExecutionException (java.util.concurrent.ExecutionException)1