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

Collaboration on an optimized One Pace addon Implementation #9

Open
vasujain275 opened this issue Mar 16, 2024 · 2 comments
Open

Collaboration on an optimized One Pace addon Implementation #9

vasujain275 opened this issue Mar 16, 2024 · 2 comments

Comments

@vasujain275
Copy link

Hi, I have been maintaining a similar One Pace addon here at - https://github.com/vasujain275/onepace-stremio-v2 for the past year.

Today, while refactoring my code, I noticed your addon. If I'm not mistaken, you are using GitHub Actions to update metadata JSON files with the newest episode hashes. I am currently taking a different approach by storing the episodes' data in a JavaScript object. Although I'm a beginner in JavaScript, I thought of an optimization: querying the One Pace backend only once per day and storing the data in a MongoDB/Redis instance. I believe Redis would be more suitable for faster load times, especially since we don't have a lot of data, just around ~300kb.

I don't want us to duplicate efforts unnecessarily. Instead, I propose that we collaborate on this and build it together. You can DM me on Twitter - @vasujain275

image

@au2001
Copy link
Owner

au2001 commented Mar 17, 2024

Hi! Great work on your extension
Didn't know the One Pace website had a GraphQL API, that's very interesting
I am currently parsing the HTML source code of the Watch page, which is clearly sub-optimal

As for the issue you are referring to, running a Redis server 24/7 is fairly wasteful in terms of resources IMHO, and it's an additional maintenance burden
The solution I opted for is GitHub Actions cache which is free and does not consume any resources (except disk storage) when not in use
It allowed me to go down to just 1 request per check (i.e. per hour), which I believe is unnoticeable for One Pace's webmasters

Another solution if not using GitHub Actions would be to store the cache files through Git directly

@au2001 au2001 closed this as completed Mar 17, 2024
@au2001 au2001 reopened this Mar 17, 2024
@vasujain275
Copy link
Author

Sure, we can use the GitHub Cache. I got to know about the one pace api from one pace website admin (Gia-Fos ig) on discord. He is a super nice guy, he explained to me their api structure. Great work on the addon, keep it up.

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

No branches or pull requests

2 participants