Skip to content

[YouTube] Correctly set uploaderUrl for lockup content type items#1344

Merged
litetex merged 1 commit intoTeamNewPipe:devfrom
FineFindus:fix/invalid-related-id
Jul 26, 2025
Merged

[YouTube] Correctly set uploaderUrl for lockup content type items#1344
litetex merged 1 commit intoTeamNewPipe:devfrom
FineFindus:fix/invalid-related-id

Conversation

@FineFindus
Copy link
Copy Markdown
Contributor

@FineFindus FineFindus commented Jul 26, 2025

Fixes an issue, where the uploader URL for related items would be incorrect, due to the YoutubeChannelLinkHandlerFactory.getUrl expecting the id with a channel/ prefix. However, the browseId used to extract the channel id is missing this prefix.

Ref: #1320

Fixes #1345

  • I carefully read the contribution guidelines and agree to them.
  • I have tested the API against NewPipe.
  • I agree to create a pull request for NewPipe as soon as possible to make it compatible with the changed API.

@ShareASmile ShareASmile added bug Issue or PR is related to a bug YouTube Service, https://www.youtube.com/ labels Jul 26, 2025
Copy link
Copy Markdown
Member

@AudricV AudricV left a comment

Choose a reason for hiding this comment

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

Thank you!

@litetex
Copy link
Copy Markdown
Member

litetex commented Jul 26, 2025

Ok I will consolidate this with #1346

Fixes an issue, where the uploader URL for related items would be incorrect,
due to the `YoutubeChannelLinkHandlerFactory.getUrl` expecting the id with a
`channel/` prefix. However, the `browseId` used to extract the channel id is
missing this prefix.

Ref: TeamNewPipe#1320

Fix getUploaderUrl not resolving correct url
@litetex litetex self-requested a review July 26, 2025 13:24
@litetex litetex force-pushed the fix/invalid-related-id branch from 4b4c99e to 352fae6 Compare July 26, 2025 13:24
Copy link
Copy Markdown
Member

@litetex litetex left a comment

Choose a reason for hiding this comment

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

Consolidated successfully.

For future reference: Please open an issue or mention me/comment in the original PR/issue if something is broken.
I don't have push notifications on Matrix enabled and only read stuff there sporadically.

@litetex litetex merged commit af82c7a into TeamNewPipe:dev Jul 26, 2025
4 checks passed
}

private String resolveUploaderUrlFromRelativeUrl(final String url) throws ParsingException {
return YoutubeChannelLinkHandlerFactory.getInstance().getUrl("c" + url);
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.

Adding c results in https://www.youtube.com/c/@handle which is invalid! Also url should be renamed to something else, as it is not an entire URL.

Suggested change
return YoutubeChannelLinkHandlerFactory.getInstance().getUrl("c" + url);
return YoutubeChannelLinkHandlerFactory.getInstance().getUrl(url);

Copy link
Copy Markdown
Member

@litetex litetex Jul 26, 2025

Choose a reason for hiding this comment

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

https://www.youtube.com/c/@handle which is invalid!

Well then YouTubeChannelExtractor is broken because it can't resolve https://www.youtube.com/@handle but successfully resolves https://www.youtube.com/c/@handle.

Update: Looks like there was something wrong on my end because https://www.youtube.com/@handle now also works...

Update v2: Ok now I'm really confused it sometimes works in the app and sometimes not. I'm not quite sure what's going on...

I will provide a fix for that in a new PR.

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.

@AudricV

There was a general problem with channelId resolution.

I created #1347

@FineFindus

This comment was marked as resolved.

@AudricV

This comment was marked as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Issue or PR is related to a bug YouTube Service, https://www.youtube.com/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

YoutubeStreamInfoItemLockupExtractor: getUploaderUrl not resolving correct url

4 participants