Skip to content
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

Fix #619: Remove ports from shared YouTube links #627

Merged
merged 6 commits into from May 16, 2024

Conversation

0x000C
Copy link
Contributor

@0x000C 0x000C commented Mar 19, 2024

Issue #619 describes how when the app is connected to a frontend hosted on a non-standard port, that port gets added to shared YouTube links.

This change removes ports from shared YouTube links.

@0x000C 0x000C marked this pull request as ready for review March 19, 2024 15:38
@stonerl
Copy link
Collaborator

stonerl commented Mar 19, 2024

To me this looks more like a workaround. It seems that the frontendHost gets constructed with the e.g. the invidious instance and only the url part is changed to YouTube afterwards.

A better solution would be to construct the frontendHost correctly in the first place.

Just my 2 cents, though …

@0x000C
Copy link
Contributor Author

0x000C commented Mar 21, 2024

I updated the shareURL function and it's caller to handle schemas and ports correctly, and more generically than before.

It no longer always uses the active instance's schema and port to form the shared URL, and instead can receive and parse a URL string for that information.

Copy link
Contributor

@arekf arekf left a comment

Choose a reason for hiding this comment

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

Thanks, could you please take care of small style changes to not to use explicit types when possible?

Model/Applications/VideosAPI.swift Outdated Show resolved Hide resolved
Model/Applications/VideosAPI.swift Outdated Show resolved Hide resolved
@arekf arekf merged commit db2417e into yattee:main May 16, 2024
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.

None yet

3 participants