From 3e78826658c7d2a4e9b3c1d73e63dacc1d39c361 Mon Sep 17 00:00:00 2001 From: Factiven Date: Sat, 12 Aug 2023 22:54:26 +0700 Subject: Update v3.9.3 - Merged Beta to Main (#51) * commit * update db * Update v3.9.1-beta-v3.1 * Update v3.9.1 * Fix watched progress not showing * Secure headers * Fix recently watched image * Update v3.9.2 > Added custom lists for AniList > Fixed episode listMode progress * Update db route * Fixed AniList * Fix next button on dub anime > video is playing sub anime instead dub * small adjusment for premid * fix eslint * small updates > added ability to remove episode from recently watched * Update v3.9.3 --- components/anime/episode.js | 1 + components/anime/infoDetails.js | 5 ++++- components/anime/viewMode/listMode.js | 18 ++++++++++++++++-- components/anime/viewMode/thumbnailDetail.js | 4 ++-- components/anime/viewMode/thumbnailOnly.js | 4 ++-- components/anime/watch/primary/details.js | 18 +++++++++++++----- components/anime/watch/primarySide.js | 20 ++++++++++++++++---- components/anime/watch/secondarySide.js | 4 ++-- 8 files changed, 56 insertions(+), 18 deletions(-) (limited to 'components/anime') diff --git a/components/anime/episode.js b/components/anime/episode.js index c889c25..5d3451b 100644 --- a/components/anime/episode.js +++ b/components/anime/episode.js @@ -246,6 +246,7 @@ export default function AnimeEpisode({ info, progress }) { info={info} episode={episode} index={index} + artStorage={artStorage} providerId={providerId} progress={progress} dub={isDub} diff --git a/components/anime/infoDetails.js b/components/anime/infoDetails.js index 0cf233c..814e49b 100644 --- a/components/anime/infoDetails.js +++ b/components/anime/infoDetails.js @@ -45,7 +45,10 @@ export default function DesktopDetails({
-

+

{info ? ( info?.title?.romaji || info?.title?.english ) : ( diff --git a/components/anime/viewMode/listMode.js b/components/anime/viewMode/listMode.js index 2016262..f3bcf05 100644 --- a/components/anime/viewMode/listMode.js +++ b/components/anime/viewMode/listMode.js @@ -4,10 +4,16 @@ export default function ListMode({ info, episode, index, + artStorage, providerId, progress, dub, }) { + const time = artStorage?.[episode?.id]?.timeWatched; + const duration = artStorage?.[episode?.id]?.duration; + let prog = (time / duration) * 100; + if (prog > 90) prog = 100; + return (
90) prog = 100; @@ -33,7 +33,7 @@ export default function ThumbnailDetail({ className="object-cover z-30 rounded-lg h-[110px] lg:h-[160px] brightness-[65%]" /> 90) prog = 100; @@ -25,7 +25,7 @@ export default function ThumbnailOnly({ Episode {episode?.number} )}
-
+

Studios @@ -93,11 +97,15 @@ export default function Details({
{info ? ( <> -
{info.title?.romaji || ""}
-
+
+ {info.title?.romaji || ""} +
+
{info.title?.english || ""}
-
{info.title?.native || ""}
+
+ {info.title?.native || ""} +
) : ( @@ -120,7 +128,7 @@ export default function Details({
{info && (

)} diff --git a/components/anime/watch/primarySide.js b/components/anime/watch/primarySide.js index c601795..b032fd6 100644 --- a/components/anime/watch/primarySide.js +++ b/components/anime/watch/primarySide.js @@ -27,6 +27,7 @@ export default function PrimarySide({ setOnList, episodeList, timeWatched, + dub, }) { const [episodeData, setEpisodeData] = useState(); const [open, setOpen] = useState(false); @@ -148,6 +149,7 @@ export default function PrimarySide({ aniTitle={info.title?.romaji || info.title?.english} track={navigation} timeWatched={timeWatched} + dub={dub} /> ) ) : ( @@ -162,13 +164,14 @@ export default function PrimarySide({ {navigation?.playing?.title || info.title?.romaji}

-

+

Episode {epiNumber} -

+

@@ -180,7 +183,11 @@ export default function PrimarySide({ (episode) => episode.number === parseInt(e.target.value) ); router.push( - `/en/anime/watch/${info.id}/${providerId}?id=${selectedEpisode.id}&num=${selectedEpisode.number}` + `/en/anime/watch/${info.id}/${providerId}?id=${ + selectedEpisode.id + }&num=${selectedEpisode.number}${ + dub ? `&dub=${dub}` : "" + }` ); }} > @@ -199,7 +206,11 @@ export default function PrimarySide({ }relative group`} onClick={() => { router.push( - `/en/anime/watch/${info.id}/${providerId}?id=${navigation?.next.id}&num=${navigation?.next.number}` + `/en/anime/watch/${info.id}/${providerId}?id=${ + navigation?.next.id + }&num=${navigation?.next.number}${ + dub ? `&dub=${dub}` : "" + }` ); }} > @@ -229,6 +240,7 @@ export default function PrimarySide({
0 ? ( episode.some((item) => item.title && item.description) > 0 ? ( episode.map((item) => { - const time = artStorage?.[item.id]?.time; + const time = artStorage?.[item.id]?.timeWatched; const duration = artStorage?.[item.id]?.duration; let prog = (time / duration) * 100; if (prog > 90) prog = 100; @@ -50,7 +50,7 @@ export default function SecondarySide({ }`} />