Skip to content

Commit

Permalink
Fix some animes missing on watch list
Browse files Browse the repository at this point in the history
  • Loading branch information
iAverages committed Feb 28, 2024
1 parent ff557cd commit c12b6e4
Showing 1 changed file with 8 additions and 16 deletions.
24 changes: 8 additions & 16 deletions apps/web/src/pages/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,14 @@ export default function Home() {
const sequalNotInList = c();

const seasonOnes = anime.data.animes.filter((a) => {
if (a.watch_status !== "COMPLETED" && a.status === "FINISHED") {
watchingReleased.push(a);
}

if (a.watch_status !== "COMPLETED" && a.status === "RELEASING") {
watchingReleasing.push(a);
}

for (const r of a.relation) {
if (r.relation === "PREQUEL") {
return false;
Expand All @@ -83,14 +91,6 @@ export default function Home() {
});

for (const a of seasonOnes) {
if (a.watch_status !== "COMPLETED" && a.status === "FINISHED") {
watchingReleased.push(a);
}

if (a.watch_status !== "COMPLETED" && a.status === "RELEASING") {
watchingReleasing.push(a);
}

let index = 0;
for (const r of a.relation) {
index++;
Expand All @@ -102,14 +102,6 @@ export default function Home() {

if (!relationInUserList) {
sequalNotInList.push(r);
} else {
if (relationInUserList.watch_status !== "COMPLETED" && relationInUserList.status === "FINISHED") {
watchingReleased.push(relationInUserList);
}

if (relationInUserList.watch_status !== "COMPLETED" && relationInUserList.status === "RELEASING") {
watchingReleasing.push(relationInUserList);
}
}

if (a.watch_status === "COMPLETED" && relationInUserList?.watch_status !== "COMPLETED") {
Expand Down

0 comments on commit c12b6e4

Please sign in to comment.