Video Object Art - if 404 returned, fall back image

For my NextPVR I've just started adding show art, where I used to show the channel icon only.

 

For some shows there is no image - and the service I request will give me a 404 error.  At the time of generating the video clip I only know the url not the state of if there is an image or not.

 

Can I do something so that if the service gets a 404 on the show art then it shows a generic image, or makes a call to another image service for the channel icon?

 

 

You can use Resource.ContentsOfURLWithFallback on the VideoClipObject, like so:

art = Resource.ContentsOfURLWithFallback(url='http://.........', fallback='art.png')

where art.png is an image in your channel bundle's Resources folder.

Great thanks.

Is it possible to go art = Resource.ContentsOfURLWithFallback(url='http://.........', fallback=http://,,,,,')?

Great thanks.

Is it possible to go art = Resource.ContentsOfURLWithFallback(url='http://.........', fallback=http://,,,,,')?

No, fallback has to be a string containing the filename of an image in your channel bundle's Resources folder