Update channel names and thumbnails when refreshing subscriptions
Update channel names and thumbnails when refreshing subscriptions
Pull Request Type
- [x] Feature Implementation
Related issue
Will help with #4340
Description
This pull request is based on a similar philosophy as #4667 (we are already making the API request, so we might as well use the data), however this pull request will have a more noticable benefit for users. #4340 removes the API requests to fetch the thumbnail URLs during the subscriptions import to avoid making extra API requests, so this pull request uses the thumbnail URLs that we get in API requests that we are already making.
Unfortunately not all requests that we make on the subscriptions page contain channel thumbnail URLs, in the cases that they are missing, we only update the channel name. Here is the list of requests that have both the channel thumbnails and channel names:
- Videos and Live tab API (local API only)
- Community tab API (local and Invidious API)
All other requests e.g. RSS feeds and videos + live Invidious API requests don't return thumbnail URLs.
Testing
Try refreshing the various subscription tabs on both API backend with RSS disabled and enabled.
Here is a profiles database that has no thumbnail URLs and has all channel names set to aaa, this will allow you to test that the data actually gets updated (You can see it happen live in the side bar if you expand it). It contains 3 of YouTube's own channels the @YouTube, @YouTubeMusic and @YouTubeOriginals channels.
Download the file, change the file extension from '.txt' to .db and import through FreeTube's UI or replace it in the filesystem.
Desktop
- OS: Windows
- OS Version: 10
- FreeTube version: 0.19.1
I tried both RSS & IV API
No thumbnail refreshed, expected?
Using Local API does refresh the thumbnails
Yes, that is expected:
Here is the list of requests that have both the channel thumbnails and channel names:
- Videos and Live tab API (local API only)
- Community tab API (local and Invidious API) All other requests e.g. RSS feeds and videos + live Invidious API requests don't return thumbnail URLs.
@efb4f5ff-1298-471a-8973-3d47447115dc
https://github.com/FreeTubeApp/FreeTube/pull/4688#issuecomment-1951769332
@ChunkyProgrammer thats about the thumbnails. Im talking about the channel name