glance icon indicating copy to clipboard operation
glance copied to clipboard

Video widget not parsing custom url schemes

Open Kamalaja opened this issue 7 months ago • 1 comments

Description

Hey there! I just came across this project and started using it! One thing I noticed is that I am unable to pass my video links to Freetube.

Freetube is generally opened via passing a new tab like freetube://https://www.youtube.com/watch?v={VIDEO_ID}

This looks like its due to glance checking if it can parse the URL (it won't be able to) then erroring and passing a #. If there was a toggle to remove that check or have it just ignore freetube, that would be amazing!

Thanks!

Kamalaja avatar May 09 '25 00:05 Kamalaja

Hey, nice catch, this is due to Go's templating automatically escaping URL's with non-standard schemes for security reasons, I'll get it fixed in the next release.

svilenmarkov avatar May 09 '25 09:05 svilenmarkov

Hey there! Unfortunately, I do not think this is resolved.

When attempting to pass a freetube url, it is still resolving to glancedomain.com/#ZgotmplZ even on the new docker image.

here is my glance.yaml

- type: videos channels: - UCRYOj4DmyxhBVrdvbsUwmAA video-url-template: freetube://https://www.youtube.com/watch?v={VIDEO-ID}

Kamalaja avatar May 13 '25 22:05 Kamalaja

That's quite odd, I tried the same config you provided and it appears to be working as expected:

- type: videos
  video-url-template: freetube://https://www.youtube.com/watch?v={VIDEO-ID}
  channels:
    - UCRYOj4DmyxhBVrdvbsUwmAA

Image

Could you please confirm that you pulled the latest Docker image? It should say Glance v0.8.0 at the bottom of the page (or v0.8.1, though either one should work).

Edit: I'm just now realizing that I forgot to fix this for the vertical-list style, if you're using that one then it would explain.

svilenmarkov avatar May 13 '25 22:05 svilenmarkov

Derp - my docker instance decided not to download the latest image for some reason. It is fixed :')

Apologies, but also glad this let you see the vertical-list style :p

Thank you so much for the patch <3

Kamalaja avatar May 13 '25 23:05 Kamalaja