summaryrefslogtreecommitdiff
path: root/app/Libraries/Helper.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Libraries/Helper.php')
-rw-r--r--app/Libraries/Helper.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/Libraries/Helper.php b/app/Libraries/Helper.php
index 1199906..8eb70a6 100644
--- a/app/Libraries/Helper.php
+++ b/app/Libraries/Helper.php
@@ -69,7 +69,7 @@ class Helper {
foreach( $user->IsWatching as $anime ) {
$stats = $anime->getStats()->get()->first();
- $airing = $anime->getAiring()->get()->first();
+ $airing = $anime->getAiring()->get()->last();
if ( is_null($airing) ) {
echo "setCalendar: There is a bug: Anime can't be null.";
@@ -106,7 +106,8 @@ class Helper {
/**
* Update user set score in calendar view.
*/
- if ( $check_watched_anime->score_user != $check->score ){
+ if ( $check_watched_anime->score_user != $check->score_user ){
+ echo "setCalendar: update user score from " . $check->score_user . " to " . $check_watched_anime->score_user . " on anime " . $anime->mal_id . "\n";
$check->score_user = $check_watched_anime->score_user;
$check->save();
}