diff --git a/README.md b/README.md index e6d9501a..337f94f5 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,6 @@ Update your anime/manga list on Kitsu.io and MyAnimeList.net [![Build Status](https://travis-ci.org/timw4mail/HummingBirdAnimeClient.svg?branch=master)](https://travis-ci.org/timw4mail/HummingBirdAnimeClient) -[![build status](https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient/badges/develop/build.svg)](https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient/commits/develop) -[![coverage report](https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient/badges/develop/coverage.svg)](https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient/commits/develop) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/timw4mail/HummingBirdAnimeClient/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/timw4mail/HummingBirdAnimeClient/?branch=master) [[Hosted Example](https://list.timshomepage.net)] @@ -52,12 +50,8 @@ Update your anime/manga list on Kitsu.io and MyAnimeList.net * public/images/manga 5. Make sure the `console` script is executable -### Using MAL API -1. Update `app/config/mal.toml` with your username and password -2. Enable MAL api in `app/config/config.toml` - ### Server Setup -See the [wiki](https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient/wikis/home) +See the [wiki](https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient/wiki) for more in-depth information diff --git a/app/appConf/routes.php b/app/appConf/routes.php index 387c74c8..f2157a8a 100644 --- a/app/appConf/routes.php +++ b/app/appConf/routes.php @@ -8,13 +8,12 @@ * * @package HummingbirdAnimeClient * @author Timothy J. Warren - * @copyright 2015 - 2017 Timothy J. Warren + * @copyright 2015 - 2018 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License * @version 4.0 - * @link https://github.com/timw4mail/HummingBirdAnimeClient + * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ - use const Aviat\AnimeClient\{ DEFAULT_CONTROLLER_METHOD, DEFAULT_CONTROLLER @@ -184,6 +183,16 @@ return [ // --------------------------------------------------------------------- // Default / Shared routes // --------------------------------------------------------------------- + 'anilist-redirect' => [ + 'path' => '/anilist-redirect', + 'action' => 'anilistRedirect', + 'controller' => DEFAULT_CONTROLLER, + ], + 'anilist-oauth' => [ + 'path' => '/anilist-oauth', + 'action' => 'anilistCallback', + 'controller' => DEFAULT_CONTROLLER, + ], 'image_proxy' => [ 'path' => '/public/images/{type}/{file}', 'action' => 'images', diff --git a/app/bootstrap.php b/app/bootstrap.php index 1ee84cb5..e216fbb3 100644 --- a/app/bootstrap.php +++ b/app/bootstrap.php @@ -20,6 +20,7 @@ use Aura\Html\HelperLocatorFactory; use Aura\Router\RouterContainer; use Aura\Session\SessionFactory; use Aviat\AnimeClient\API\{ + Anilist, Kitsu, MAL, Kitsu\KitsuRequestBuilder, @@ -45,11 +46,14 @@ return function (array $configArray = []) { $appLogger = new Logger('animeclient'); $appLogger->pushHandler(new RotatingFileHandler(__DIR__ . '/logs/app.log', Logger::NOTICE)); + $anilistRequestLogger = new Logger('anilist-request'); + $anilistRequestLogger->pushHandler(new RotatingFileHandler(__DIR__ . '/logs/anilist_request.log', Logger::NOTICE)); $kitsuRequestLogger = new Logger('kitsu-request'); $kitsuRequestLogger->pushHandler(new RotatingFileHandler(__DIR__ . '/logs/kitsu_request.log', Logger::NOTICE)); $malRequestLogger = new Logger('mal-request'); $malRequestLogger->pushHandler(new RotatingFileHandler(__DIR__ . '/logs/mal_request.log', Logger::NOTICE)); $container->setLogger($appLogger); + $container->setLogger($anilistRequestLogger, 'anilist-request'); $container->setLogger($kitsuRequestLogger, 'kitsu-request'); $container->setLogger($malRequestLogger, 'mal-request'); diff --git a/app/config/config.toml.example b/app/config/config.toml.example index 52e0f8ec..28f954b7 100644 --- a/app/config/config.toml.example +++ b/app/config/config.toml.example @@ -11,8 +11,5 @@ whose_list = "Tim" # do you wish to show the anime collection? show_anime_collection = true -# do you have a My Anime List account set up in mal.toml? -use_mal_api = false - # path to public directory on the server asset_dir = "/../../public" \ No newline at end of file diff --git a/app/config/mal.toml.example b/app/config/mal.toml.example deleted file mode 100644 index 0e3233e0..00000000 --- a/app/config/mal.toml.example +++ /dev/null @@ -1,6 +0,0 @@ -################################################################################ -# My Anime LIst Integration Config # -################################################################################ - -username = "timw4mail" -password = "mysecretpassword" \ No newline at end of file diff --git a/app/views/anime/add.php b/app/views/anime/add.php index 1c039547..8e586e37 100644 --- a/app/views/anime/add.php +++ b/app/views/anime/add.php @@ -13,7 +13,7 @@
- +
diff --git a/app/views/anime/cover.php b/app/views/anime/cover.php index b43dc9d3..7f6d5e66 100644 --- a/app/views/anime/cover.php +++ b/app/views/anime/cover.php @@ -1,4 +1,4 @@ -
+
isAuthenticated()): ?> Add Item @@ -24,27 +24,13 @@ " alt="" />
- isAuthenticated()): ?> -
- - Edit - -
- -
@@ -77,6 +63,20 @@
+ isAuthenticated()): ?> +
+ + Edit + +
+ +
Rating: / 10
Episodes: @@ -85,7 +85,7 @@
-
html($item['anime']['type']) ?>
+
html($item['anime']['show_type']) ?>
html($item['airing']['status']) ?>
html($item['anime']['age_rating']) ?>
diff --git a/app/views/anime/details.php b/app/views/anime/details.php index eb6e333b..7e6d4fc6 100644 --- a/app/views/anime/details.php +++ b/app/views/anime/details.php @@ -38,7 +38,7 @@
-

+

diff --git a/app/views/anime/edit.php b/app/views/anime/edit.php index 08707720..d7831d86 100644 --- a/app/views/anime/edit.php +++ b/app/views/anime/edit.php @@ -2,23 +2,25 @@

Edit Anime List Item

- +
- + + + - + diff --git a/app/views/collection/add.php b/app/views/collection/add.php index 91e46d33..dc768568 100644 --- a/app/views/collection/add.php +++ b/app/views/collection/add.php @@ -13,7 +13,7 @@
- +
diff --git a/app/views/collection/cover-item.php b/app/views/collection/cover-item.php new file mode 100644 index 00000000..0244dd83 --- /dev/null +++ b/app/views/collection/cover-item.php @@ -0,0 +1,27 @@ + \ No newline at end of file diff --git a/app/views/collection/cover.php b/app/views/collection/cover.php index 6ae83460..7441f79b 100644 --- a/app/views/collection/cover.php +++ b/app/views/collection/cover.php @@ -1,44 +1,25 @@ -
+
isAuthenticated()): ?> Add Item

There's nothing here!

+
+ $items): ?> -
+ type="radio" id="collection-tab-" name="collection-tabs" /> + +

- - + +
-
+
+ +
diff --git a/app/views/collection/edit.php b/app/views/collection/edit.php index 6b7af08f..b7ef28d1 100644 --- a/app/views/collection/edit.php +++ b/app/views/collection/edit.php @@ -2,7 +2,7 @@

Edit Anime Collection Item

-
+
- - - + + + + + isAuthenticated()): ?> + + + + + + + + + \ No newline at end of file diff --git a/app/views/collection/list.php b/app/views/collection/list.php index 8d0bb6c3..049a63be 100644 --- a/app/views/collection/list.php +++ b/app/views/collection/list.php @@ -1,51 +1,42 @@
-isAuthenticated()): ?> -Add Item - - -

There's nothing here!

- - $items): ?> -

-
- - - isAuthenticated()): ?> - - - - - - - - - - - - - - isAuthenticated()): ?> - - - - - - - - - - - -
ActionsTitleEpisode CountEpisode LengthShow TypeAge RatingNotes
- Edit - - - - - " . $item['alternate_title'] . "" : "" ?> -
-
- - + isAuthenticated()): ?> + Add Item + + +

There's nothing here!

+ + +
+ $items): ?> + type="radio" id="collection-tab-" + name="collection-tabs"/> + +
+

+ + + + isAuthenticated()): ?> + + + + + + + + + + + + + + + +
ActionsTitleEpisode CountEpisode LengthShow TypeAge RatingNotes
+
+ + +
+
\ No newline at end of file diff --git a/app/views/header.php b/app/views/header.php index 5a95e909..4a7de884 100644 --- a/app/views/header.php +++ b/app/views/header.php @@ -1,11 +1,11 @@ + <?= $title ?> - - + diff --git a/app/views/main-menu.php b/app/views/main-menu.php index 7c424b57..f27ca846 100644 --- a/app/views/main-menu.php +++ b/app/views/main-menu.php @@ -7,7 +7,7 @@ $lastSegment = $urlGenerator->lastSegment(); $extraSegment = $lastSegment === 'list' ? '/list' : ''; ?> -

+

+