Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Restore check for sectionListRender #120

Merged

Conversation

MarmadileManteater
Copy link
Contributor

@MarmadileManteater MarmadileManteater commented Nov 3, 2022

Restore check for sectionListRender

Pull Request Type

  • Bugfix
  • Feature Implementation
  • Documentation
  • Other

Description

Music channels such as Infected Mushroom still use the gridRenderer to display their content, and as a result, yt-channel-info is returning no videos for these channels. This PR restores the check for the sectionListRenderer in order to fix this issue with music channels.

Screenshots

before:
image
after:
image

Testing

Here are some examples of channels which qualify as "music" channels if you want to check them:

Additional Information

It might be worth adding a test which checks a music channel in order to make sure the response is not empty.

This issue was originally brought up by someone on the freetube matrix channel.

Music channels still use the `gridRenderer`.
@ChunkyProgrammer
Copy link
Member

Could you fix the linter issue and it might be a good idea to replace shorts test with a test for one of the music channels :)

I accidentally added the same condition twice to an `if else`.
The result was that one of them would never execute.
auto-merge was automatically disabled November 3, 2022 18:38

Head branch was pushed to by a user without write access

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) November 3, 2022 18:39
@MarmadileManteater
Copy link
Contributor Author

Could you fix the linter issue and it might be a good idea to replace shorts test with a test for one of the music channels :)

The linter caught a conditional branch which I had accidentally made impossible to reach.

Shorts don't display a visible lengthSeconds on channel pages
at the moment, and I am unsure where this data could be pulled from
without making additional calls.
@MarmadileManteater
Copy link
Contributor Author

If we are going to get rid of the shorts test, we could just adjust it to be more accurate to what is currently working. Looking at the other tests in the same file, most of them expect data.items.length to be zero. If the shorts channel test was changed to expect the same thing as the other channel video tests, the test would work, and it would still catch if shorts channels suddenly started returning nothing.

auto-merge was automatically disabled November 3, 2022 18:53

Head branch was pushed to by a user without write access

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) November 3, 2022 18:53
auto-merge was automatically disabled November 3, 2022 18:58

Head branch was pushed to by a user without write access

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) November 3, 2022 18:58
@FreeTubeBot FreeTubeBot merged commit 29093eb into FreeTubeApp:development Nov 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants