remove download on fail

This commit is contained in:
rebelonion 2024-01-17 01:47:42 -06:00
parent 51a5609395
commit e398238fe6

View file

@ -251,6 +251,13 @@ class AnimeDownloaderService : Service() {
notificationManager.notify(NOTIFICATION_ID, builder.build()) notificationManager.notify(NOTIFICATION_ID, builder.build())
snackString("${task.title} - ${task.episode} Download failed") snackString("${task.title} - ${task.episode} Download failed")
logger("Download failed: ${download.failureReason}") logger("Download failed: ${download.failureReason}")
downloadsManager.removeDownload(
DownloadedType(
task.title,
task.episode,
DownloadedType.Type.ANIME,
)
)
FirebaseCrashlytics.getInstance().recordException( FirebaseCrashlytics.getInstance().recordException(
Exception( Exception(
"Anime Download failed:" + "Anime Download failed:" +