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

Add QT Url support for freetube protocol #3119

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,16 @@ function runApp() {
}

function baseUrl(arg) {
return arg.replace('freetube://', '')
let newArg = arg.replace('freetube://', '')
// add support for authority free url
.replace('freetube:', '')

// fix for Qt URL, like `freetube://https//www.youtube.com/watch?v=...`
// For details see https://github.com/FreeTubeApp/FreeTube/pull/3119
if (newArg.startsWith('https') && newArg.charAt(5) !== ':') {
newArg = 'https:' + newArg.substring(5)
}
return newArg
}

function getLinkUrl(argv) {
Expand Down