json([ 'settings' => $this->user->is_admin ? $this->settingRepository->getAllAsKeyValueArray() : [], 'playlists' => $this->playlistRepository->getAllByCurrentUser(), 'current_user' => UserResource::make($this->user), 'use_last_fm' => $this->lastfmService->used(), 'use_you_tube' => $this->youTubeService->enabled(), // @todo clean this mess up 'use_i_tunes' => $this->iTunesService->used(), 'allow_download' => config('koel.download.allow'), 'supports_transcoding' => config('koel.streaming.ffmpeg_path') && is_executable(config('koel.streaming.ffmpeg_path')), 'cdn_url' => static_url(), 'current_version' => koel_version(), 'latest_version' => $this->user->is_admin ? $this->applicationInformationService->getLatestVersionNumber() : koel_version(), 'song_count' => $this->songRepository->count(), 'song_length' => $this->songRepository->getTotalLength(), ]); } }