Media pictures from the Internet not loading

I’m trying to create a dynamic YouTube widget. Using material you and the nothing OS design. If it works, it will be great.

The problem is that KWGT doesn’t load the images. I use the YouTube RSS function. This works perfectly in any RSS feed reader.

KWGT also loads the image and displays it. But only in the editor and not on the home screen.

$wg(wg(“OwnGalaxy”, rss, 0, link), url, “.jpg”, 0)$

(Here the editor turns the YouTube link into the YouTube name. Of course that shouldn’t happen. I have the full link there).

This is just an example. But as I said, it works in the editor. Even if I put a direct link to an image location it doesn’t work.

For some reason, this formula works. Just not with the content above, because too much else is read.
This is normal but not what happens above.
$wg(“https://images.app.goo.gl/7uSN3Y23S9CEcBKE9”, raw)$

I have now experimented a bit with ChatGPT Herrin but unfortunately have not found a solution.

The direct link to an image doesn’t work either.

Nothing OS 3.0 Stable with December 2024 security patch. Nothing Phone 2A. Stock NothingOS Launcher.

Hi there,

The reason that your script does not work is because the news feed source is using an XML structure instead of a RSS structure.

Here’s a code snippet from me, hopefully it is a solution for you.

https://i2.ytimg.com/vi/$tc(split,
wg("https://www.youtube.com/feeds/videos.xml?channel_id=UCoYFo3L74njkPCbj6LyiexA", xml, "//entry[1]/link/@href")
, "=", 1
)$/hqdefault.jpg

This code snippet will retrieve the thumbnail URL of the 1st news feed item. Put this code snippet in the Bitmap property of the Image element.

I have tested this code snippet and it worked.

I hope this would help.
:smiling_face::+1:

1 Like