Skip to content

refactor(Channel): fetch channel based on channel identifier - #8849

Draft
FineFindus wants to merge 13 commits into
libre-tube:masterfrom
FineFindus:refactor/channel-identifier
Draft

FineFindus wants to merge 13 commits into
libre-tube:masterfrom
FineFindus:refactor/channel-identifier

Conversation

@FineFindus

@FineFindus FineFindus commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

Refactors the MediaServiceRepository to use a single function to retrieve the channel, irrespective of how the channel is identified (e.g. Id, Name or Handle).

In the longterm, I hope we can use this for all channel-based navigation, however it is difficult to refactor, as some fragments explicitly require the set data (e.g. the id for groups).

Closes #8842.

Requires #8791

Remove the special handling of the video tabs, instead relying only on the
extracted channel tabs.
Moves the channel tab loading to a viewModel, following modern Android
development best practices, keeping the data independent of the Fragment
lifecycle.
This avoids reloading the channel tab when switching between tabs.
Implements support for displaying and using sort filter chips, that sort the
channel tabs content according to the selected value.
Instead of using separate functions to retrieve the channel using an id or a
name, use a single function that handles both, depending on the argument.
Some channel have an additional handle-based vanity URL in the form of
`https://youtube.com/@handle` (which may not correspond to their ID or username).

Closes libre-tube#8842
@FineFindus FineFindus changed the title refactor(MediaServiceRepository): combine functions to retrieve channels refactor(Channel): fetch channel based on channel identifier Oct 6, 2026
@FineFindus
FineFindus requested a review from Bnyro October 6, 2026 14:49

@Bnyro Bnyro left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice cleanup, I agree that this is much nicer than the different methods we had before.

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.

Sharing a channel from YouTube app to LibreTube: "No service can handle the URL"

2 participants