8000 Channels: Fix community tab by Fijxu · Pull Request #5183 · iv-org/invidious · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Channels: Fix community tab #5183

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

Merged
merged 1 commit into from
Feb 26, 2025
Merged

Conversation

Fijxu
Copy link
Member
@Fijxu Fijxu commented Feb 18, 2025

May close #5182

image

API works well too.

If I need to change anything, just tell me

@Fijxu Fijxu requested review from SamantazFox and a team as code owners February 18, 2025 22:26
@@ -308,6 +310,7 @@ module Invidious::Routes::Channels
private KNOWN_TABS = {
"home", "videos", "shorts", "streams", "podcasts",
"releases", "playlists", "community", "channels", "about",
"posts",
Copy link
Member Author

Choose a reason for hiding this comment

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

Here I didn't replace "community" by "posts". I left it as a fallback.

@ChunkyProgrammer
Copy link
Contributor
ChunkyProgrammer commented Feb 24, 2025

Suggestion: Since the url didn't change and just the text, maybe this can be handled similarly to how channel live tab is handled? (1 ternary statement that changes live to streams, in this case change post to community).

tab_names = tabs_json.as_a.compact_map do |entry|
name = entry.dig?("tabRenderer", "title").try &.as_s.downcase
# This is a small fix to not add extra code on the HTML side
# I.e, the URL for the "live" tab is .../streams, so use "streams"
# everywhere for the sake of simplicity
(name == "live") ? "streams" : name
end

@syeopite syeopite merged commit 58ad848 into iv-org:master Feb 26, 2025
8 checks passed
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.

[Bug] Community tab disappeared from channels information
3 participants
0