Your Digital Media Has Never Looked So Good

 
User avatar
RokuMarkn
Roku Engineering
Posts: 1581
Joined: Mon Jun 09, 2008 9:20 am

Re: Trouble setting theme attributes from a URL.

Wed Sep 24, 2014 9:28 am

Perhaps the images that don't work are incompatible in some way. Is it always the same files that work and don't work? Can you package one of the non-working images in your app package and see if you can display it from a pkg:// path?

--Mark
 
dratio
Topic Author
Posts: 17
Joined: Thu Sep 11, 2014 11:29 am

Re: Trouble setting theme attributes from a URL.

Fri Sep 26, 2014 9:37 am

RokuMarkn wrote:
Perhaps the images that don't work are incompatible in some way. Is it always the same files that work and don't work? Can you package one of the non-working images in your app package and see if you can display it from a pkg:// path?

--Mark


I have put the images in the pkg and calling them from there they display with no problem. It's not always the same files, I have replaced the images I am trying to display from a server with other images, other formats, etc. to no avail. They will not display if they are being called from a URL.
 
dratio
Topic Author
Posts: 17
Joined: Thu Sep 11, 2014 11:29 am

Re: Trouble setting theme attributes from a URL.

Fri Sep 26, 2014 10:47 am

I've also just now noticed something else that is weird... I have assigned the same web-based image to both HDBackgroundImageUrl and HDSmallIconUrl and their SD counterparts, and lo and behold it displays on HDSmallIconUrl! So, when the same web-based image is displayed in both HDBackgroundImageUrl and HDSmallIconUrl, all is well. However, if a different web-based image is assigned to HDSmallIconUrl, it will not display.
To clarify, when I run this it works fine:
    'aboutOptions is an XML object containing URLs to images
    o.SDSmallIconUrl        = aboutOptions.thumbnail
    o.HDSmallIconUrl        = aboutOptions.thumbnail
    o.ShortDescriptionLine1 = aboutOptions.description
    o.ShortDescriptionLine2 = aboutOptions.copyright
    o.HDBackgroundImageUrl  = aboutOptions.thumbnail
    o.SDBackgroundImageUrl  = aboutOptions.thumbnail

and when I run this, the image will not display for HDSmallIconUrl:
    'aboutOptions is an XML object containing URLs to images
    o.SDSmallIconUrl        = aboutOptions.thumbnail
    o.HDSmallIconUrl        = aboutOptions.thumbnail
    o.ShortDescriptionLine1 = aboutOptions.description
    o.ShortDescriptionLine2 = aboutOptions.copyright
    o.HDBackgroundImageUrl  = aboutOptions.background
    o.SDBackgroundImageUrl  = aboutOptions.background
 
User avatar
TheEndless
** Valued Community Member **
Posts: 9231
Joined: Mon Oct 04, 2004 10:15 am
Location: US
Contact:

Re: Trouble setting theme attributes from a URL.

Fri Sep 26, 2014 11:33 am

Do the icons display if you highlight the item then un-highlight it? It sounds like it's just not downloading fast enough.
Either way, my recommendation would still be to download it to tmp: first.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
 
belltown
Posts: 1465
Joined: Thu Dec 09, 2010 1:43 pm
Contact:

Re: Trouble setting theme attributes from a URL.

Fri Sep 26, 2014 11:49 am

I agree with TheEndless. I think your best bet is to read the image url into a tmp: file first, making sure that if you're displaying more than one image on a screen then they're each downloaded to a separate tmp: file.

I suggested that earlier and the your first attempt at coding that was flawed. You haven't showed us the code that supposedly worked (and checked the http response code), so it's possible that code may have been flawed too. Showing us the actual code you're using would be helpful.

It would also help if you could post a link to one of the image urls that doesn't appear to be working.

Another question: are any of the image urls, "https" urls, or could possibly be redirecting to "https" urls?
https://github.com/belltown/
 
EnTerr
** Valued Community Member **
Posts: 3834
Joined: Sun Jan 02, 2011 2:41 am

Re: Trouble setting theme attributes from a URL.

Fri Sep 26, 2014 1:54 pm

dratio wrote:
I've also just now noticed something else that is weird... I have assigned the same web-based image to both HDBackgroundImageUrl and HDSmallIconUrl and their SD counterparts, and lo and behold it displays on HDSmallIconUrl! So, when the same web-based image is displayed in both HDBackgroundImageUrl and HDSmallIconUrl, all is well. However, if a different web-based image is assigned to HDSmallIconUrl, it will not display.

Oh... now that you say it like that - YES!

There is a bug that causes that. Really sneaky. I ran into it when i worked with roListScreen few months ago but did not bother to mention it since i already report way too many bugs "per capita". (Somebody may think i get paid to dig dirt on B/S)

My experience was that HDSmallIconUrl / SDSmallIconUrl do not show up unless i have set the same image in HDPosterUrl / SDPosterUrl. My un-educated guess of why this is happening would be that a cache akin to roTextureManager is used internally for the images and *SmallIconUrl fetches from there but does not pre-load URLs unlike *PosterUrl and *BackgroundImageUrl

By the way, HDSmallIconUrl / SDSmallIconUrl are not documented anywhere so one may argue you are not supposed to use them :)

PS. And on another note, HDPosterUrl / SDPosterUrl are also undocumented for roListScreen but might be actually the ones you want to use instead of HDBackgroundImageUrl / SDBackgroundImageUrl. I was startled to discover *PosterUrl @ roListScreen.
 
dratio
Topic Author
Posts: 17
Joined: Thu Sep 11, 2014 11:29 am

Re: Trouble setting theme attributes from a URL.

Fri Sep 26, 2014 2:43 pm

EnTerr wrote:
dratio wrote:
I've also just now noticed something else that is weird... I have assigned the same web-based image to both HDBackgroundImageUrl and HDSmallIconUrl and their SD counterparts, and lo and behold it displays on HDSmallIconUrl! So, when the same web-based image is displayed in both HDBackgroundImageUrl and HDSmallIconUrl, all is well. However, if a different web-based image is assigned to HDSmallIconUrl, it will not display.

Oh... now that you say it like that - YES!

There is a bug that causes that. Really sneaky. I ran into it when i worked with roListScreen few months ago but did not bother to mention it since i already report way too many bugs "per capita". (Somebody may think i get paid to dig dirt on B/S)

My experience was that HDSmallIconUrl / SDSmallIconUrl do not show up unless i have set the same image in HDPosterUrl / SDPosterUrl. My un-educated guess of why this is happening would be that a cache akin to roTextureManager is used internally for the images and *SmallIconUrl fetches from there but does not pre-load URLs unlike *PosterUrl and *BackgroundImageUrl

By the way, HDSmallIconUrl / SDSmallIconUrl are not documented anywhere so one may argue you are not supposed to use them :)

PS. And on another note, HDPosterUrl / SDPosterUrl are also undocumented for roListScreen but might be actually the ones you want to use instead of HDBackgroundImageUrl / SDBackgroundImageUrl. I was startled to discover *PosterUrl @ roListScreen.


Interesting. Thanks for all the info I really appreciate it and I will try using the PosterUrl. Then I guess I would just set background and smallIcon to the same Url and it would display. Thanks again!
 
User avatar
RokuJoel
Posts: 1758
Joined: Mon Nov 14, 2011 5:22 pm

Re: Trouble setting theme attributes from a URL.

Fri Sep 26, 2014 5:57 pm

EnTerr wrote:
(Somebody may think i get paid to dig dirt on B/S)


You could:
https://www.roku.com/about/employment

- Joel

Who is online

Users browsing this forum: No registered users and 8 guests