NikkelM / Random-YouTube-Video

A browser extension that allows you to truly randomly shuffle videos from any YouTube channel, offering many customization options.
https://chromewebstore.google.com/detail/random-youtube-video/kijgnjhogkjodpakfmhgleobifempckf
GNU Lesser General Public License v3.0
18 stars 3 forks source link

[API] Add already fetched videos to localStorage after every request #45

Open NikkelM opened 1 year ago

NikkelM commented 1 year ago

This prevents users that click the random button multiple times from eating up API queries, by re-using what was already fetched

NikkelM commented 1 year ago

If this becomes necessary we can think about it, otherwise the amount of complexity this would add to the fetching logic outweighs the benefits

NikkelM commented 1 year ago

We could use an entry in the localStorage for "inProgress" playlists, which would also store items such as the most recent pageToken etc. to continue where fetching was last stopped