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

[Feature]: Optimize Streaming Source Selection by Memorizing Previously Successful Source #105

Open
babakfp opened this issue Sep 23, 2024 · 0 comments

Comments

@babakfp
Copy link

babakfp commented Sep 23, 2024

What feature do you want to add?

Hi 👋

Let's say we have these streaming sources (A, B, C, D, E, F). This is what happenes whenever user wants to watch an episode:

1. Source A fetches and fails.
2. Source B fetches and fails.
3. Source C fetches and fails.
4. Source D fetches and fails.
5. Source **E** fetches and **success**.
6. Source plays.
7. Next episode.

    1. Source A fetches and fails.
    2. Source B fetches and fails.
    3. Source C fetches and fails.
    4. Source D fetches and fails.
    5. Source **E** fetches and **success**.
    6. Source plays.
    7. Next episode.

Instead, a feature can be added to memorize which streaming source was successful and used previously. Result:

1. Source A fetches and fails.
2. Source B fetches and fails.
3. Source C fetches and fails.
4. Source D fetches and fails.
5. Source **E** fetches and **success**.
6. Source plays.
7. Next episode.

    1. Source **E** fetches and **success**.
    2. Source plays.
    3. Next episode.

How should it work? Simply momerise the previously used seccessfull streaming source and whenever a new episode plays, sort the sources array and put the previously used seccessfull streaming source at the begening of the list.

Why do you want to have this feature?

It can sometimes be annoying to wait for source selection (when you already know the top ones are going to fail and the bottom one is going to succeed).

Any other details to share?

Benefits:

  • Prevents unnecessary API calls.
  • Better UX.
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

1 participant