summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhorus2024-11-26 14:09:54 +0100
committerhorus2024-11-26 14:09:54 +0100
commit9a1816bc2fd590ad0d8af466ad1c027229207537 (patch)
treea2e454eaaca9e51fd504d1d8b8b683b24a1e26cf
parent05e4351d5c100762881982f3c518e2ba8ee3bee3 (diff)
downloadsenpai-9a1816bc2fd590ad0d8af466ad1c027229207537.tar.gz
deleted animeHEADmaster
-rw-r--r--app/AnimeStats.php13
-rw-r--r--app/Console/Kernel.php1
-rw-r--r--app/Libraries/Background.php5
3 files changed, 16 insertions, 3 deletions
diff --git a/app/AnimeStats.php b/app/AnimeStats.php
index c235a00..e586280 100644
--- a/app/AnimeStats.php
+++ b/app/AnimeStats.php
@@ -79,6 +79,10 @@ class AnimeStats extends Model {
public function fillStats( $id, $season_year = 0, $season_name = "" ) {
$this->mal_id = $id;
+ if ( 54591 == $this->mal_id ) {
+ return true;
+ }
+
$jikan = new Malclient;
if ( 0 == $season_year || "" == $season_name ) {
@@ -99,9 +103,12 @@ class AnimeStats extends Model {
(new \Jikan\Request\Anime\AnimeRequest( $this->mal_id ))
);
} catch (\Exception $e) {
- echo "Error requesting AnimeInfo for " . $this->mal_id ."\n";
- echo "Message: " . $e->getMessage();
- echo "\n\n";
+ // Anime 54591 got deleted on MAL
+ if ( 54591 != $this->mal_id ) {
+ echo "Error requesting AnimeInfo for " . $this->mal_id ."\n";
+ echo "Message: " . $e->getMessage();
+ echo "\n\n";
+ }
return false;
}
$this->score = $animeInfo->getScore();
diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php
index 5ae24a6..70863ca 100644
--- a/app/Console/Kernel.php
+++ b/app/Console/Kernel.php
@@ -28,6 +28,7 @@ class Kernel extends ConsoleKernel
$schedule->command("anime:saveStats")
->everyThirtyMinutes()->name('saveStats')
->emailOutputOnFailure( env('STATUS_MAIL_ADDRESS') )
+ #->everyMinute()->name('saveStats1');
->withoutOverlapping();
$schedule->command("anime:saveSeasonAiring")
diff --git a/app/Libraries/Background.php b/app/Libraries/Background.php
index 8cd8f07..7973f99 100644
--- a/app/Libraries/Background.php
+++ b/app/Libraries/Background.php
@@ -415,6 +415,11 @@ class Background {
}
$count = 0;
foreach( $anime as $entry ) {
+
+ if ( 54591 == $entry->mal_id ) {
+ continue;
+ }
+
$count++;
$fill = new Anime;
$fill->fillStats( $entry->mal_id, $skip_if_unpopular=false ); # check every anime we have, even with less than 10k members