Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(gogoanime): Refactor fetchEpisodeSources #514

Merged
merged 4 commits into from
Apr 16, 2024

Conversation

hase0278
Copy link
Contributor

@hase0278 hase0278 commented Apr 5, 2024

What kind of change does this PR introduce?
Refactoring fetch episode sources for slightly faster direct download link generator. Basically just made sure to make download link point to updated domain since referer hostname = download hostname? Or is it not always the case? Because if it is not always the case please reject this PR.

@@ -476,7 +476,7 @@ class Gogoanime extends AnimeParser {
throw new Error('Something went wrong. Please try again later.');
}
};
fetchDirectDownloadLink = async (downloadUrl: string, captchaToken: string?): Promise<{ source: string | undefined; link: string | undefined }[]> => {
fetchDirectDownloadLink = async (downloadUrl: string, captchaToken: string): Promise<{ source: string | undefined; link: string | undefined }[]> => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hase0278 after removing the null safety on captchaToken the if statement on line 485 doesn't seem to be needed anymore

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay I can edit it if needed. Just been busy lately.

@riimuru
Copy link
Contributor

riimuru commented Apr 8, 2024

I'm not sure if that's always the case with gogoanime download domain, but this is a good approach in case they change domains.

Copy link
Contributor Author

@hase0278 hase0278 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed unnecessary t

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants