smov icon indicating copy to clipboard operation
smov copied to clipboard

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

Open babakfp opened this issue 1 year ago • 0 comments

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.

babakfp avatar Sep 23 '24 21:09 babakfp