diff --git a/app/commands/MigrateOldData.php b/app/commands/MigrateOldData.php index 0f03180b..a18fbf83 100644 --- a/app/commands/MigrateOldData.php +++ b/app/commands/MigrateOldData.php @@ -322,6 +322,21 @@ $this->error('Could not sync favourite ' . $fav->id . ' because ' . $e->getMessage()); } } + + $this->info('Syncing Followers'); + $oldFollowers = $oldDb->table('user_follower')->get(); + foreach ($oldFollowers as $follower) { + try { + DB::table('followers')->insert([ + 'id' => $follower->id, + 'user_id' => $follower->follower_id, + 'artist_at' => $follower->user_at, + 'created_at' => $follower->created_at, + ]); + } catch (Exception $e) { + $this->error('Could not sync follower ' . $fav->id . ' because ' . $e->getMessage()); + } + } } private function getIdDirectory($type, $id) { diff --git a/app/commands/RefreshCache.php b/app/commands/RefreshCache.php index b2747ca8..532bf393 100644 --- a/app/commands/RefreshCache.php +++ b/app/commands/RefreshCache.php @@ -119,6 +119,12 @@ class RefreshCache extends Command { $resources[$type][$id] = $resource; } + foreach (DB::table('followers') as $follower) { + $userResource = $this->getUserCacheItem($cacheItems, $follower->user_id, 'artist', $follower->artist_id); + $userResource['is_followed'] = true; + $cacheItems[$follower->user_id]['artist'][$follower->artist_id] = $userResource; + } + foreach ($resources as $name => $resourceArray) { foreach ($resourceArray as $id => $resource) { DB::table($name . 's')->whereId($id)->update($resource); diff --git a/app/library/Assets.php b/app/library/Assets.php index d362b63b..4607ef44 100644 --- a/app/library/Assets.php +++ b/app/library/Assets.php @@ -37,7 +37,7 @@ return $retVal; } - return ''; + return ''; } public static function scriptAssetCollection($area) { diff --git a/app/views/home/index.blade.php b/app/views/home/index.blade.php index b8290e9c..47a568da 100644 --- a/app/views/home/index.blade.php +++ b/app/views/home/index.blade.php @@ -1,6 +1,12 @@ @extends('shared._app_layout') @section('app_content') -

Look, it's a website!

-

This page should be what search engines see

+

Welcome to Pony.fm

+

The pony fan music site. By a brony, for bronies.

+

+ We provide a comprehensive set of free tools to host, distribute, and catalogue your music, integrated with a rich community experience for artists and listeners alike. +

+

+ Features include unlimited downloads, unlimited uploads, lossless uploads and much more! Click here to get all of our features! +

@endsection \ No newline at end of file