-
Notifications
You must be signed in to change notification settings - Fork 877
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
Update subscription view to be able to load videos from video cache per channel #3668
Update subscription view to be able to load videos from video cache per channel #3668
Conversation
There's a GitHub warning for src/renderer/views/Subscriptions/Subscriptions.js at line 11 |
Just to be sure, this is how B1 should be tested right?
Edit: Passed all testcases, just waiting on confirmation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove unused import in src/renderer/views/Subscriptions/Subscriptions.js
@efb4f5ff-1298-471a-8973-3d47447115dc @ChunkyProgrammer Now the changes includes those from #3673 (to solve code conflict in advance) |
e5454e3
to
3310780
Compare
3310780
to
ca8a8a7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Tested this pull request and most situations work fine, however I found this one situation where it doesn't load from the cache: Fetch feed automatically: OFF Total channels: 50 Switch to profile 1: load the subscriptions (10 requests) Don't do anything with profiles 3-8 Switch to all channels profile: load subscriptions (requests 50, expected 35 as I expected it to load the 15 previously loaded ones from the cache) |
Is that behaviour expected or is that a bug? |
@absidue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving as your explanation makes sense.
Now #3673 requires even more changes arrrr |
…4380) * Implement first draft of last subscription refresh timestamp * Update styling to be a top bar * Update styling to be banner-compatible, & increase banner X button size on mobile * Update subscription refresh timestamp to be relative * Implement refresh timestamps for Shorts, Live, and Community tabs * Extract refresh widget to its own component * Add Trending and Popular refresh widgets with timestamps * Fix justifying when no timestamp exists * Move timestamps to utils store * Remove unneeded ref classes and currentLocale computed property * Add page-specific titles for each feed type * Implement showing least recent cache date per profile * Update styling property placement & match top nav box shadow on ft-refresh-widget * Implement showing timestamp for profile only if all channel subscriptions can be found in cache * Disable refresh button instead of removing it or the widget from the DOM * Increase top banner's top margin * Update channel caching calls to provide timestamps * Modify updateCacheByChannel functions to have default timestamp of new Date() * Fix 30-day month relative date calculation scenarios through new optional parameter * Rectify Case 3 (see #3668) * Add back missing line in Popular.js
Pull Request Type
Related issue
A variant (?) of #3665
Description
#3665 restores the "original" behaviour (well the code that was there but disabled somehow)
This is a different video caching strategy
Videos (and potentially other info like live streams and shorts) are cached per channel instead of profile
The difference is that every profile can potentially just load from cache if all the channels of selected profile have required content in cache, without the limitation of only caching one profile at a time
Screenshots
Similar to 3665 one so no repeating here
Testing
Preparation:
Before starting each test please reopen window/app/refresh to ensure local state is reset
A. Auto fetching disabled
A1. Loading from cache after all channel cached
A2a. Refresh subscriptions effects - With default profile loaded first
(due to only cache for channels in profile A refreshed, but cache for not refreshed channel are not purged)
A2b. Refresh subscriptions effects - Without default profile loaded first
(due to not all channels are cached)
(due to
Profile B with only some channels from A
)A3. After subscribing new channel(s)
B. Auto fetching enabled
B1. Loading from
subscriptionsCacheForAllSubscriptionsProfile
Load videos from remote
is done automaticallyB2a. Refresh subscriptions effects - With default profile loaded first
(due to only cache for channels in profile A refreshed, but cache for not refreshed channel are not purged)
B2b. Refresh subscriptions effects - Without default profile loaded first
(i.e. all videos are fetched from remote not from cache)
(due to
Profile B with only some channels from A
)B3. After subscribing new channel(s)
(i.e. all videos are fetched from remote not from cache)
Desktop
Additional context
Fetch Feed Automatically
is enabled by defaultTo avoid expectation issue when enabled all videos are fetch from remote (if cache for any channel absent)