-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: News Fetch Error, Wrong Episodes on Media, Episode Img on Watch …
…Page
- Loading branch information
Showing
7 changed files
with
71 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// made for many MISTAKES of API with spelling. | ||
// It converts the wrong name that i got to the correct one, | ||
// or to the one that gets the correct result. | ||
export function checkApiMisspellingMedias(mediaTitle: string) { | ||
|
||
const animesList = [ | ||
{ wrongNameOnApi: "NARUTO: Shippuuden", correctName: "NARUTO: Shippuden" }, | ||
{ wrongNameOnApi: "JUJUTSU KAISEN", correctName: "JUJUTSU KAISEN (TV)" } | ||
] | ||
|
||
const hasCorrectName = animesList.find(item => item.wrongNameOnApi.toLowerCase() == mediaTitle.toLowerCase()) | ||
|
||
return hasCorrectName?.correctName || mediaTitle | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters