Skip to content

Commit

Permalink
Fix for danbooru
Browse files Browse the repository at this point in the history
  • Loading branch information
NO-ob committed Jan 11, 2022
1 parent 8fe435f commit 01e0be7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/libBooru/DanbooruHandler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ class DanbooruHandler extends BooruHandler{

// Create a BooruItem for each post in the list
List<BooruItem> newItems = [];
try {
for (int i = 0; i < posts.length; i++) {

for (int i = 0; i < posts.length; i++) {
try {
var current = posts.elementAt(i);
Logger.Inst().log(current.toString(), "DanbooruHandler", "parseResponse", LogTypes.booruHandlerRawFetched);
/**
Expand Down Expand Up @@ -62,11 +63,10 @@ class DanbooruHandler extends BooruHandler{
} else {
Logger.Inst().log("Item #$i has no file url", "DanbooruHandler", "parseResponse", LogTypes.booruHandlerInfo);
}
} catch (e){
Logger.Inst().log("Exception during fetch $e", "DanbooruHandler", "parseResponse", LogTypes.booruHandlerFetchFailed);
}
} catch (e){
Logger.Inst().log("Exception during fetch $e", "DanbooruHandler", "parseResponse", LogTypes.exception);
}

int lengthBefore = fetched.length;
fetched.addAll(newItems);
setMultipleTrackedValues(lengthBefore, fetched.length);
Expand Down

0 comments on commit 01e0be7

Please sign in to comment.