summaryrefslogtreecommitdiff
path: root/app/Libraries
diff options
context:
space:
mode:
authorhorus2020-09-22 23:59:52 +0200
committerhorus2020-09-22 23:59:52 +0200
commita6090b9a44d37dbd562817d7dacbc53a5a2200b8 (patch)
tree19ed99155e8bae7e03d30ddda1d51b41334ed78c /app/Libraries
parent32ee16621f45b39e5b2b93798d78d70791e5ab64 (diff)
downloadsenpai-a6090b9a44d37dbd562817d7dacbc53a5a2200b8.tar.gz
add duration to anime
Diffstat (limited to 'app/Libraries')
-rw-r--r--app/Libraries/Background.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/Libraries/Background.php b/app/Libraries/Background.php
index fbdaa1f..2d63a3e 100644
--- a/app/Libraries/Background.php
+++ b/app/Libraries/Background.php
@@ -210,6 +210,9 @@ class Background {
if ( ! is_null( $enhancement->title->userPreferred ) ) {
$update["title_pref"] = $enhancement->title->userPreferred;
}
+ if ( ! is_null( $enhancement->duration ) ) {
+ $update["duration"] = $enhancement->duration;
+ }
#echo "Updating " . $anime->title_pref . " (" . $anime->mal_id . ")\n";
DB::table('anime')
@@ -219,7 +222,7 @@ class Background {
public function saveEnhancementForAll() {
#$anime_all = Anime::where('airing_status', env('ANIME_IS_AIRING'))->where('synopsis', '')->get();
- $anime_all = Anime::where('synopsis', '')->get();
+ $anime_all = Anime::where('synopsis', '')->orWhereNull('duration')->get();
foreach( $anime_all as $anime ) {
$this->addEnhancementToAnime($anime);
sleep(1);