From 25b0bf29423c26363f699247d72b68832a9e773e Mon Sep 17 00:00:00 2001 From: horus Date: Sun, 19 Apr 2020 18:07:16 +0200 Subject: Bugfix --- app/Libraries/Background.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/Libraries/Background.php') diff --git a/app/Libraries/Background.php b/app/Libraries/Background.php index 30fa1f9..c491d44 100644 --- a/app/Libraries/Background.php +++ b/app/Libraries/Background.php @@ -24,8 +24,9 @@ class Background { return; } - $stats = $anime->getStats()->get()->first(); + $stats = $anime->getStats()->get()->last(); if ( is_null($stats) || is_null($stats->score) ) { + echo "saveAiring: getStats() is null. returning for anime:" . $anime->title_pref . " (" . $anime->mal_id . ")\n"; return; } -- cgit v1.2.3