Open absidue opened 1 year ago
For the community tab, that's an "error" returned by youtube's API. In addition, the community tab still relies on older code, which hasn't been cleaned, so it isn't handled the same way as the others.
If that error is expected, does that mean you'll be returning errors for the other channel tab endpoints too or is the goal to have the community tab API endpoint behave the same as the other ones and return an empty response?
Ideally from an API user's perspective, it would be best to only return errors if there is an actual error, an empty channel tab is normal on YouTube, so shouldn't return an error. Would also align it with the behaviour of other endpoints e.g. you don't return an error when there are no search results for a search query.
Yes, I agree with you here: the community endpoint shouldn't give an error if there is no posts. The plan if to return an empty array like for the other tabs.
I'm not sure if I agree with just returning an empty array. Invidious should display some kind of message when the tab is empty instead of just having it be blank imo.
@syeopite We were talking about the API. Regarding the frontend, I agree with you! Edit: And by extension, we should also show messages for no playlists/videos (in the same fashion as the "no search results" message).
Playlist tab doesn't seem to be showing anymore for that channel so I guess YouTube fixed that?
Describe the bug A channel tab being empty is handled differently depending on the tab. The playlists tab displays nothing on the website and returns an empty API response
{"playlists":[],"continuation":null}
, the community tab however showsThis channel hasn't posted yet
on the website and returns a HTTP 500 API response with this error:{"error":"This channel hasn't posted yet"}
.It's weird that Invidious treats the playlists tab being empty as okay, but the community tab being empty as an error. The
This channel hasn't posted yet
is displayed on YouTube too, however Invidious happily ignores theThis channel has no playlists.
message on the playlists tab.Steps to Reproduce Webpage:
{instance}/channel/UCUKPG1-r4WFyxpyhIuCs86Q/playlists
{instance}/channel/UCUKPG1-r4WFyxpyhIuCs86Q/community
API:
{instance}/api/v1/channels/UCUKPG1-r4WFyxpyhIuCs86Q/playlists
{instance}/api/v1/channels/UCUKPG1-r4WFyxpyhIuCs86Q/community
Screenshots Playlists tab:
Community tab: