Help with image update

Topics for the MainLobby 4 client
User avatar
simonmason
Expert
Expert
Posts: 855
Joined: Tue Dec 26, 2006 9:06 pm
Contact:

Help with image update

Postby simonmason » Sat Nov 29, 2014 12:13 pm

I am setting up a custom screensaver on my flash clients. I wrote a script that scans my photo directory, selects a random image, and writes the file to my html directory. I am now creating a scene that displays this image. I am having trouble getting the image to update.

In the scene I am calling:

http://demon:6246/GetImage?{{screensaver_image}}|width=880|height=550

Each time I write the image file I also update the {{screensaver_image}} variable with:

HTTP://192.168.2.250:6246/HTML/RandomPi ... opMain.jpg

Note that the name of the jpg does not change, I am only updating the variable each time in an attempt to get the image to update on the scene. It appears to be loading the same image from the cache each time.

Is there anyway around this or do I have to modify my code to name the image uniquely each time to force a refresh? Thanks.
Simon D. S. Mason

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: Help with image update

Postby CinemarDave » Sat Nov 29, 2014 2:18 pm

Since this is Flash it is using the IE cache and that is why the image is not changing. One quick thing to do is on each client go into Internet Explorer General/Settings and set the value for "Check for newer versions of stored pages" to "Every time I visit the page" and then clear the existing IE cache.

If this does not do the trick then modify the {{screensaver_image}} url so that it includes a ?foo=something at the end of the URL.
e.g. http://192.168.2.250:6246/HTML/RandomPi ... ?tick=tock and see what that does. Browser rules say that URLs with passed parameters should not be cached.

User avatar
simonmason
Expert
Expert
Posts: 855
Joined: Tue Dec 26, 2006 9:06 pm
Contact:

Re: Help with image update

Postby simonmason » Mon Dec 01, 2014 9:56 am

I will try this out. Does the string after the ? have to change each time? I notice on the fanart you appear to be writing a random number at the end of each image path. Thanks.
Simon D. S. Mason

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: Help with image update

Postby CinemarDave » Mon Dec 01, 2014 10:55 am

Technically it does not need to be unique. We append the number of CPU ticks elapsed during the day just to prove the value is changing.

User avatar
simonmason
Expert
Expert
Posts: 855
Joined: Tue Dec 26, 2006 9:06 pm
Contact:

Re: Help with image update

Postby simonmason » Tue Dec 02, 2014 7:17 am

I could only get it to work when I change the file name each time. So I am modifying my code to write out a unique file name each time and then clean it up when the next file writes out.

Are there any abilities to fade in the image or anything like this or is it just appear and disappear? Thanks.
Simon D. S. Mason

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: Help with image update

Postby CinemarDave » Tue Dec 02, 2014 11:05 am

Fading is not an option at this time.


Return to “MainLobby 4 Client”

Who is online

Users browsing this forum: No registered users and 1 guest