Version 5.1 - All the GraphQL #32
@ -45,6 +45,10 @@ Update your anime/manga list on Kitsu.io and MyAnimeList.net
|
||||
3. Configure settings in `app/config/config.toml` to your liking
|
||||
4. Create the following directories if they don't exist, and make sure they are world writable
|
||||
* public/js/cache
|
||||
* public/images/avatars
|
||||
* public/images/anime
|
||||
* public/images/characters
|
||||
* public/images/manga
|
||||
5. Make sure the `console` script is executable
|
||||
|
||||
### Using MAL API
|
||||
|
4
console
4
console
@ -18,9 +18,9 @@ unset($APP_DIR);
|
||||
unset($SRC_DIR);
|
||||
unset($CONF_DIR);
|
||||
|
||||
// ---------------------------------------------------------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------------
|
||||
// Start console script
|
||||
// ---------------------------------------------------------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------------
|
||||
$console = new \ConsoleKit\Console([
|
||||
'cache-prime' => Command\CachePrime::class,
|
||||
'cache-clear' => Command\CacheClear::class,
|
||||
|
@ -47,7 +47,7 @@ class Model {
|
||||
use ContainerAware;
|
||||
use KitsuTrait;
|
||||
|
||||
const FULL_TRANSFORMED_LIST_CACHE_KEY = 'kitsu-full-organized-anime-list';
|
||||
const LIST_PAGE_SIZE = 100;
|
||||
|
||||
/**
|
||||
* Class to map anime list items
|
||||
@ -382,7 +382,7 @@ class Model {
|
||||
{
|
||||
$status = $options['filter']['status'] ?? '';
|
||||
$count = $this->getAnimeListCount($status);
|
||||
$size = 100;
|
||||
$size = static::LIST_PAGE_SIZE;
|
||||
$pages = ceil($count / $size);
|
||||
|
||||
$requester = new ParallelAPIRequest();
|
||||
@ -468,7 +468,7 @@ class Model {
|
||||
* @param array $options
|
||||
* @return Request
|
||||
*/
|
||||
public function getPagedAnimeList(int $limit = 100, int $offset = 0, array $options = [
|
||||
public function getPagedAnimeList(int $limit, int $offset = 0, array $options = [
|
||||
'include' => 'anime.mappings'
|
||||
]): Request
|
||||
{
|
||||
@ -626,7 +626,7 @@ class Model {
|
||||
{
|
||||
$status = $options['filter']['status'] ?? '';
|
||||
$count = $this->getMangaListCount($status);
|
||||
$size = 100;
|
||||
$size = static::LIST_PAGE_SIZE;
|
||||
$pages = ceil($count / $size);
|
||||
|
||||
$requester = new ParallelAPIRequest();
|
||||
@ -676,7 +676,7 @@ class Model {
|
||||
* @param array $options
|
||||
* @return Request
|
||||
*/
|
||||
public function getPagedMangaList(int $limit = 100, int $offset = 0, array $options = [
|
||||
public function getPagedMangaList(int $limit, int $offset = 0, array $options = [
|
||||
'include' => 'manga.mappings'
|
||||
]): Request
|
||||
{
|
||||
|
@ -149,10 +149,6 @@ class SyncKitsuWithMal extends BaseCommand {
|
||||
'status' => AnimeWatchingStatus::MAL_TO_KITSU[$item['my_status']],
|
||||
'progress' => $item['my_watched_episodes'],
|
||||
'reconsuming' => (bool) $item['my_rewatching'],
|
||||
'reconsumeCount' => array_key_exists('times_rewatched', $item)
|
||||
? $item['times_rewatched']
|
||||
: 0,
|
||||
// 'notes' => ,
|
||||
'rating' => $item['my_score'] / 2,
|
||||
'updatedAt' => (new \DateTime())
|
||||
->setTimestamp((int)$item['my_last_updated'])
|
||||
@ -179,10 +175,6 @@ class SyncKitsuWithMal extends BaseCommand {
|
||||
'progress' => $item['my_read_chapters'],
|
||||
'volumes' => $item['my_read_volumes'],
|
||||
'reconsuming' => (bool) $item['my_rereadingg'],
|
||||
/* 'reconsumeCount' => array_key_exists('times_rewatched', $item)
|
||||
? $item['times_rewatched']
|
||||
: 0, */
|
||||
// 'notes' => ,
|
||||
'rating' => $item['my_score'] / 2,
|
||||
'updatedAt' => (new \DateTime())
|
||||
->setTimestamp((int)$item['my_last_updated'])
|
||||
|
@ -111,7 +111,7 @@ class Index extends BaseController {
|
||||
$data = $model->getUserData($username);
|
||||
$orgData = JsonAPI::organizeData($data);
|
||||
$this->outputHTML('me', [
|
||||
'title' => 'About' . $this->config->get('whose_list'),
|
||||
'title' => 'About ' . $this->config->get('whose_list'),
|
||||
'data' => $orgData[0],
|
||||
'attributes' => $orgData[0]['attributes'],
|
||||
'relationships' => $orgData[0]['relationships'],
|
||||
|
@ -98,7 +98,7 @@ class MenuGenerator extends UrlGenerator {
|
||||
foreach ($menuConfig as $title => $path)
|
||||
{
|
||||
$has = $this->string($this->path())->contains($path);
|
||||
$selected = ($has && strlen($this->path()) >= strlen($path));
|
||||
$selected = ($has && mb_strlen($this->path()) >= mb_strlen($path));
|
||||
|
||||
$link = $this->helper->a($this->url($path), $title);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user