From 8dc41c2f4adceb6b3b55285de494d5b8ab5faa1b Mon Sep 17 00:00:00 2001 From: Tommy Danks Date: Sun, 5 Feb 2023 11:52:18 +0000 Subject: [PATCH 1/3] feat(anilist) add currentEpisodeCount --- src/providers/meta/anilist.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/providers/meta/anilist.ts b/src/providers/meta/anilist.ts index 349fd520f..d1a0f6da3 100644 --- a/src/providers/meta/anilist.ts +++ b/src/providers/meta/anilist.ts @@ -127,6 +127,7 @@ class Anilist extends AnimeParser { genres: item.genres, color: item.coverImage?.color, totalEpisodes: item.episodes ?? item.nextAiringEpisode?.episode - 1, + currentEpisodeCount: item?.nextAiringEpisode ? item?.nextAiringEpisode?.episode - 1 : item.episodes, type: item.format, releaseDate: item.seasonYear, })) ?? @@ -154,6 +155,7 @@ class Anilist extends AnimeParser { genres: item.genre, color: item.color, totalEpisodes: item.currentEpisode, + currentEpisodeCount: item?.nextAiringEpisode ? item?.nextAiringEpisode?.episode - 1 : item.currentEpisode, type: item.format, releaseDate: item.year, })), @@ -2080,11 +2082,11 @@ class Anilist extends AnimeParser { }; } -// (async () => { -// const ani = new Anilist(); -// const search = await ani.fetchAnimeInfo('21', false); -// // const sources = await ani.fetchEpisodeSources(search.episodes![5].id); -// console.log(search); -// })(); +(async () => { + const ani = new Anilist(); + const search = await ani.search('Vinland Saga Season 2'); + // const sources = await ani.fetchEpisodeSources(search.episodes![5].id); + console.log(search); +})(); export default Anilist; From 12924aca8240cf79dc39feccc25632c62b948ee8 Mon Sep 17 00:00:00 2001 From: Tommy Danks Date: Sun, 5 Feb 2023 12:02:58 +0000 Subject: [PATCH 2/3] add currentEpisodeCount --- src/providers/meta/anilist.ts | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/providers/meta/anilist.ts b/src/providers/meta/anilist.ts index d1a0f6da3..759d7bcad 100644 --- a/src/providers/meta/anilist.ts +++ b/src/providers/meta/anilist.ts @@ -412,6 +412,7 @@ class Anilist extends AnimeParser { episode: data.data.Media.nextAiringEpisode?.episode, }; animeInfo.totalEpisodes = data.data.Media?.episodes ?? data.data.Media.nextAiringEpisode?.episode - 1; + animeInfo.currentEpisode = data.data.Media?.nextAiringEpisode?.episode ? data.data.Media.nextAiringEpisode?.episode - 1 : data.data.Media?.episodes; animeInfo.rating = data.data.Media.averageScore; animeInfo.duration = data.data.Media.duration; animeInfo.genres = data.data.Media.genres; @@ -1465,13 +1466,15 @@ class Anilist extends AnimeParser { animeInfo.status = MediaStatus.UNKNOWN; } animeInfo.releaseDate = data.data.Media.startDate.year; - if (data.data.Media.nextAiringEpisode?.airingAt) + if (data.data.Media.nextAiringEpisode?.airingAt) animeInfo.nextAiringEpisode = { airingTime: data.data.Media.nextAiringEpisode?.airingAt, timeUntilAiring: data.data.Media.nextAiringEpisode?.timeUntilAiring, episode: data.data.Media.nextAiringEpisode?.episode, }; + animeInfo.totalEpisodes = data.data.Media?.episodes ?? data.data.Media.nextAiringEpisode?.episode - 1; + animeInfo.currentEpisode = data.data.Media?.nextAiringEpisode?.episode ? data.data.Media.nextAiringEpisode?.episode - 1 : data.data.Media?.episodes || undefined; animeInfo.rating = data.data.Media.averageScore; animeInfo.duration = data.data.Media.duration; animeInfo.genres = data.data.Media.genres; @@ -1572,6 +1575,7 @@ class Anilist extends AnimeParser { ? MediaStatus.HIATUS : MediaStatus.UNKNOWN, episodes: item.node.episodes, + image: item.node.coverImage.extraLarge ?? item.node.coverImage.large ?? item.node.coverImage.medium, cover: item.node.bannerImage ?? @@ -2082,11 +2086,11 @@ class Anilist extends AnimeParser { }; } -(async () => { - const ani = new Anilist(); - const search = await ani.search('Vinland Saga Season 2'); - // const sources = await ani.fetchEpisodeSources(search.episodes![5].id); - console.log(search); -})(); +// (async () => { +// const ani = new Anilist(); +// const search = await ani.fetchAnimeInfo('136430'); +// // const sources = await ani.fetchEpisodeSources(search.episodes![5].id); +// console.log(search); +// })(); export default Anilist; From 9c1feaf741e54ba9ac93583067b937da540ff58d Mon Sep 17 00:00:00 2001 From: Tommy Danks Date: Sun, 5 Feb 2023 12:05:24 +0000 Subject: [PATCH 3/3] v1.4.1 --- CHANGELOG.md | 56 +++++----------------------------------------------- package.json | 2 +- 2 files changed, 6 insertions(+), 52 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f3b4d9450..9ce1e6490 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,58 +7,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). -## [v1.4.0](https://github.com/consumet/consumet.ts/compare/v1.4.0...v1.4.0) +## [v1.4.1](https://github.com/consumet/consumet.ts/compare/v1.2.12...v1.4.1) -### Merged ### Merged +- v1.4.0 [`#231`](https://github.com/consumet/consumet.ts/pull/231) +- v1.3.8 [`#229`](https://github.com/consumet/consumet.ts/pull/229) - Mal popularity [`#228`](https://github.com/consumet/consumet.ts/pull/228) - Mal popularity [`#227`](https://github.com/consumet/consumet.ts/pull/227) - added popularity to mal [`#226`](https://github.com/consumet/consumet.ts/pull/226) - v1.3.7 [`#225`](https://github.com/consumet/consumet.ts/pull/225) - fixed base parser/cors config and fixed animepahe test [`#224`](https://github.com/consumet/consumet.ts/pull/224) - -## [v1.3.7](https://github.com/consumet/consumet.ts/compare/v1.3.6...v1.3.7) - 2023-02-02 - -### Merged - - v1.3.6 [`#218`](https://github.com/consumet/consumet.ts/pull/218) - -### Commits - -- fixed base parser/cors config and fixed animepahe test [`767cf67`](https://github.com/consumet/consumet.ts/commit/767cf679a756da5aea1c2c3bb0cef1eb6950e334) - -## [v1.3.6](https://github.com/consumet/consumet.ts/compare/v1.3.5...v1.3.6) - 2023-01-30 - -### Merged - - fix wrong cors proxy in mangasee123 [`#214`](https://github.com/consumet/consumet.ts/pull/214) - fix kwik extractor wrong cors url [`#212`](https://github.com/consumet/consumet.ts/pull/212) - fix mal is undefined [`#211`](https://github.com/consumet/consumet.ts/pull/211) - -### Commits - -- feat (gogoanime): add a method to get anime id from episode id(#216) [`2eb4908`](https://github.com/consumet/consumet.ts/commit/2eb49080bbfe40b790bb24cc57f15fbfcbb502b3) - -## [v1.3.5](https://github.com/consumet/consumet.ts/compare/v1.3.4...v1.3.5) - 2023-01-28 - -### Merged - - chore (gogoanime): Stop sending errors to the console [`#210`](https://github.com/consumet/consumet.ts/pull/210) - Add proxy change method [`#205`](https://github.com/consumet/consumet.ts/pull/205) - feat: add MAL ID to zoro anime info [`#193`](https://github.com/consumet/consumet.ts/pull/193) - 👺 bye, kamyroll! optimised tests slightly. [`#207`](https://github.com/consumet/consumet.ts/pull/207) - -### Commits - -- chore: bump version to v1.3.5 [`4c2590a`](https://github.com/consumet/consumet.ts/commit/4c2590a509190450763e21ce7b51222ed0cadec8) -- Update cors proxy urls [`6e507da`](https://github.com/consumet/consumet.ts/commit/6e507daed9bfd3f8d41f37c6053fe385e57e8c8d) -- Update README.md [`6c1bce3`](https://github.com/consumet/consumet.ts/commit/6c1bce3319e545631eb45a912f1cbbaae7e6432d) - -## [v1.3.4](https://github.com/consumet/consumet.ts/compare/v1.3.3...v1.3.4) - 2023-01-23 - -### Merged - - Bump to v1.3.4 [`#204`](https://github.com/consumet/consumet.ts/pull/204) - Write tests for animepahe [`#203`](https://github.com/consumet/consumet.ts/pull/203) - fix streamsb and kamyroll logo [`#202`](https://github.com/consumet/consumet.ts/pull/202) @@ -66,21 +33,11 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - Update nodejs-ci.yml [`#201`](https://github.com/consumet/consumet.ts/pull/201) - Update nodejs-ci.yml [`#200`](https://github.com/consumet/consumet.ts/pull/200) - subtitles now returns when using enime, if available [`#198`](https://github.com/consumet/consumet.ts/pull/198) - -## [v1.3.3](https://github.com/consumet/consumet.ts/compare/v1.3.1...v1.3.3) - 2023-01-23 - -### Merged - - Bump to 1.3.3 [`#197`](https://github.com/consumet/consumet.ts/pull/197) - Add workflow to remove npm version [`#196`](https://github.com/consumet/consumet.ts/pull/196) - Fixed minor issues with some providers [`#195`](https://github.com/consumet/consumet.ts/pull/195) - ignore axios in dependabot [`#192`](https://github.com/consumet/consumet.ts/pull/192) - add workflow dispatch for releases [`#190`](https://github.com/consumet/consumet.ts/pull/190) - -## [v1.3.1](https://github.com/consumet/consumet.ts/compare/v1.3.0...v1.3.1) - 2023-01-17 - -### Merged - - Undo version to 1.3.1 [`#189`](https://github.com/consumet/consumet.ts/pull/189) - Update npm-publish.yml [`#186`](https://github.com/consumet/consumet.ts/pull/186) - version bump [`#185`](https://github.com/consumet/consumet.ts/pull/185) @@ -101,11 +58,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - Updated rapidclown key URL [`#163`](https://github.com/consumet/consumet.ts/pull/163) - feat(tmdb) add episode Id to movie info [`#162`](https://github.com/consumet/consumet.ts/pull/162) - fix(TMDB): fix page and add other pagination values [`#161`](https://github.com/consumet/consumet.ts/pull/161) - -## [v1.3.0](https://github.com/consumet/consumet.ts/compare/v1.2.12...v1.3.0) - 2022-12-26 - -### Merged - - feat(dramacool) add dramacool provider [`#158`](https://github.com/consumet/consumet.ts/pull/158) - Add TMDB Provider [`#154`](https://github.com/consumet/consumet.ts/pull/154) - feat(flixhq): add recommendations and cover image to the info method [`#155`](https://github.com/consumet/consumet.ts/pull/155) @@ -121,7 +73,9 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). ### Commits +- chore: add dist [`fd84b65`](https://github.com/consumet/consumet.ts/commit/fd84b651be12d8063c9986adc017755a84d36fd5) - chore: bump version 1.2.13-rc -> 1.3.0 [`c3497c8`](https://github.com/consumet/consumet.ts/commit/c3497c83b28d7379f76180556bf10ea5a3ffb73c) +- feat (gogoanime): add a method to get anime id from episode id(#216) [`2eb4908`](https://github.com/consumet/consumet.ts/commit/2eb49080bbfe40b790bb24cc57f15fbfcbb502b3) ## [v1.2.12](https://github.com/consumet/consumet.ts/compare/v1.2.12-rc...v1.2.12) - 2022-12-14 diff --git a/package.json b/package.json index 21ef23fe1..7ffbbdb3f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@consumet/extensions", - "version": "1.4.0", + "version": "1.4.1", "description": "Nodejs library that provides high-level APIs for obtaining information on various entertainment media such as books, movies, comic books, anime, manga, and so on.", "main": "dist/index.js", "types": "dist/index.d.ts",