Change the if/else for regex,prefix,postfix to an if statement so they may all be used.
I am pulling down the list of new blu-ray releases from
https://www.blu-ray.com/rss/newreleasesfeed.xml
which does not include an image url, so I needed to isolate the movie ID, then do a prefix and postfix to build an img tag to have it shown:
Blue Ray Movie Releases
- type: custom:list-card
entity: sensor.blu_ray_releases
title: Blu-Ray Releases
columns:
- title: ''
field: link
regex: \d+(?=\/)
prefix: '<img src="https://images3.static-bluray.com/movies/covers/'
postfix: '_small.jpg" />'
- title: Title
field: title
add_link: link
style:
- white-space: nowrap
Change the if/else for regex,prefix,postfix to an if statement so they may all be used.
I am pulling down the list of new blu-ray releases from https://www.blu-ray.com/rss/newreleasesfeed.xml which does not include an image url, so I needed to isolate the movie ID, then do a prefix and postfix to build an img tag to have it shown: