Search in sources :

Example 1 with DownloadRequester

use of de.danoeh.antennapod.core.storage.DownloadRequester in project AntennaPod by AntennaPod.

the class OpmlFeedQueuer method doInBackground.

@Override
protected Void doInBackground(Void... params) {
    DownloadRequester requester = DownloadRequester.getInstance();
    for (int selected : selection) {
        OpmlElement element = OpmlImportHolder.getReadElements().get(selected);
        Feed feed = new Feed(element.getXmlUrl(), null, element.getText());
        try {
            requester.downloadFeed(context.getApplicationContext(), feed);
        } catch (DownloadRequestException e) {
            e.printStackTrace();
        }
    }
    return null;
}
Also used : DownloadRequester(de.danoeh.antennapod.core.storage.DownloadRequester) DownloadRequestException(de.danoeh.antennapod.core.storage.DownloadRequestException) SuppressLint(android.annotation.SuppressLint) OpmlElement(de.danoeh.antennapod.core.export.opml.OpmlElement) Feed(de.danoeh.antennapod.core.feed.Feed)

Aggregations

SuppressLint (android.annotation.SuppressLint)1 OpmlElement (de.danoeh.antennapod.core.export.opml.OpmlElement)1 Feed (de.danoeh.antennapod.core.feed.Feed)1 DownloadRequestException (de.danoeh.antennapod.core.storage.DownloadRequestException)1 DownloadRequester (de.danoeh.antennapod.core.storage.DownloadRequester)1