diff options
| author | horus | 2020-04-19 18:07:16 +0200 |
|---|---|---|
| committer | horus | 2020-04-19 18:07:16 +0200 |
| commit | 25b0bf29423c26363f699247d72b68832a9e773e (patch) | |
| tree | c16b238b8064810e9ca3715c38dfa5745e5adb45 | |
| parent | 3484356137e16f98c40e0e3e55b4f3fc0630586c (diff) | |
| download | senpai-25b0bf29423c26363f699247d72b68832a9e773e.tar.gz | |
Bugfix
| -rw-r--r-- | app/Libraries/Background.php | 3 | ||||
| -rw-r--r-- | app/Libraries/Helper.php | 4 |
2 files changed, 4 insertions, 3 deletions
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; } diff --git a/app/Libraries/Helper.php b/app/Libraries/Helper.php index 8eb70a6..9f0ca2d 100644 --- a/app/Libraries/Helper.php +++ b/app/Libraries/Helper.php @@ -68,11 +68,11 @@ class Helper { } foreach( $user->IsWatching as $anime ) { - $stats = $anime->getStats()->get()->first(); + $stats = $anime->getStats()->get()->last(); $airing = $anime->getAiring()->get()->last(); if ( is_null($airing) ) { - echo "setCalendar: There is a bug: Anime can't be null."; + echo "setCalendar: This is a bug! No airing date found for: " . $anime->title_pref . " (" . $anime->mal_id . ")\n"; continue; } /** |
