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

Update channel names and thumbnails when refreshing subscriptions #4688

Conversation

absidue
Copy link
Member

@absidue absidue commented Feb 18, 2024

Update channel names and thumbnails when refreshing subscriptions

Pull Request Type

  • 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.

profiles.txt

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

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) February 18, 2024 17:56
@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Feb 18, 2024
@PikachuEXE
Copy link
Collaborator

I tried both RSS & IV API
image

No thumbnail refreshed, expected?

Using Local API does refresh the thumbnails

@absidue
Copy link
Member Author

absidue commented Feb 19, 2024

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.

Copy link
Member

@efb4f5ff-1298-471a-8973-3d47447115dc efb4f5ff-1298-471a-8973-3d47447115dc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Local API + RSS: Shorts and video tab shows all channel names correctly, EXPECTED

VirtualBoxVM_0x0vD7KHFJ.mp4

IV API, Local API + RSS, IV API + RSS: live tab somehow doesnt update the first channel in the list, UNEXPECTED

VirtualBoxVM_oM8KbhRepZ.mp4

@ChunkyProgrammer
Copy link
Member

@efb4f5ff-1298-471a-8973-3d47447115dc

@ChunkyProgrammer thats about the thumbnails. Im talking about the channel name

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Retested again and everything LGTM. Not sure what went wrong -.-

@FreeTubeBot FreeTubeBot merged commit 393f889 into FreeTubeApp:development Mar 7, 2024
5 checks passed
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Mar 7, 2024
@absidue absidue deleted the subscriptions-refresh-thumbnails branch March 7, 2024 15:37
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

Successfully merging this pull request may close these issues.

5 participants