Fix gallery adder trying 3 times even if there are no errors

This commit is contained in:
Jobobby04 2023-05-09 21:53:30 -04:00
parent 45f839c5e1
commit 2ed07181b5

View File

@ -59,7 +59,7 @@ class GalleryAdder(
fav: Boolean = false,
forceSource: UrlImportableSource? = null,
throttleFunc: suspend () -> Unit = {},
retry: Int = 1
retry: Int = 1,
): GalleryAddEvent {
logger.d(context.getString(R.string.gallery_adder_importing_gallery, url, fav.toString(), forceSource))
try {
@ -197,6 +197,7 @@ class GalleryAdder(
for (i in 1..retryCount) {
try {
result = block()
break
} catch (e: Exception) {
if (e is EHentai.GalleryNotFoundException) {
throw e