Create report if download generated by system

This commit is contained in:
Nathan Mascitelli 2020-02-07 10:55:12 -05:00
parent 895af777cf
commit 39e0d20ae7
2 changed files with 4 additions and 2 deletions

View File

@ -108,9 +108,11 @@ public class DownloadServiceNotification {
if (status.isSuccessful()) {
successfulDownloads++;
} else if (!status.isCancelled()) {
createReport = true;
failedDownloads++;
}
if (failedDownloads > 0 || status.isGeneratedBySystem() && status.getFeedfileType() == FeedMedia.FEEDFILETYPE_FEEDMEDIA) {
createReport = true;
}
}
if (createReport) {

View File

@ -96,7 +96,7 @@ public class MediaDownloadedHandler implements Runnable {
} catch (ExecutionException e) {
Log.e(TAG, "ExecutionException in MediaHandlerThread: " + e.getMessage());
updatedStatus = new DownloadStatus(media, media.getEpisodeTitle(),
DownloadError.ERROR_DB_ACCESS_ERROR, false, e.getMessage(), false);
DownloadError.ERROR_DB_ACCESS_ERROR, false, e.getMessage(), request.isGeneratedBySystem());
}
if (GpodnetPreferences.loggedIn() && item != null) {