Lovelace: Upcoming Media Card


#84

I checked and yes, there is a show coming up that’s all new and banner is missing in sonarr. So you have most likely already nailed the issue.


#85

Updates!

Updated both components:
Sonarr

  • Exception if images fail
  • Fallback image if they do

Radarr

  • Optimization
  • Fallback images
Radarr component still needs a bit of work, but out of sync issues should be mostly under control. In my tests I only got one at startup. Still getting the error that the component takes too long at startup as well. Working on it, but getting there.

#86

Sonarr works fine!

Getting this exception for radarr.

Log Details (ERROR)
Fri Sep 07 2018 21:37:12 GMT+0200 (centraleuropeisk sommartid)

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py”, line 243, in async_update_ha_state
device_attr = self.device_state_attributes
File “/config/custom_components/sensor/radarr_upcoming_media.py”, line 109, in device_state_attributes
attributes[‘airdate{}’.format(str(self.attribNum))] = movie[‘physicalRelease’]
KeyError: ‘physicalRelease’


#87

Quick update and a fix from @JBassett. Huge thanks to him.
See if it helps. Seems as if out of sync and startup issues are gone.


#88

I’ve noticed that it takes a moment after startup for the card to populate, but it’s a small price to pay. Things can still get out of order for radarr the moment, but working on the fix.


#89

Hi, got this exception now for radarr.

Log Details (ERROR)
Fri Sep 07 2018 22:33:11 GMT+0200 (centraleuropeisk sommartid)

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py”, line 243, in async_update_ha_state
device_attr = self.device_state_attributes
File “/config/custom_components/sensor/radarr_upcoming_media.py”, line 103, in device_state_attributes
elif movie[‘physicalRelease’] > datetime.now().replace(microsecond=0).isoformat()+‘Z’:
KeyError: ‘physicalRelease’


#90

Strange, it’s acting as if there is a movie in your radarr that has neither a “physical release” date nor an “in cinemas” date.

Would you mind PMing me a list of your upcoming movies or even better a look at your calendar API?

You get your API like this for example in your browser:

http://192.168.1.2:7878/api/calendar?apikey={YOUR_API_KEY)&start=2018-09-07&end=2018-12-30


#91

Thanks for all the help @mayker Sonarr and radarr working perfectly now!


#92

Mary Queen of Scots is back…
All my Radarr is in reverse chronological order too BTW - latest releases to earliest… No biggie. And the sync error is GONE!

Thanks again.


#93

@DavidFW1960 You got timing!

Quick Radarr Update:

Movies correctly sorted by date

That is all.


#94

You’ve knocked it outa da park now!!! Woo Hoo!!!


#95

Going to concentrate on making the card a bit easier for other services to use and finally put text size customization in. If anyone has any suggestions, please let me know.


#96

Great job.

Can not see banners yet?


#97

Still does not work for me. I get this now

2018-09-08 09:22:05 ERROR (MainThread) [homeassistant.components.sensor] radarr_upcoming_media: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 251, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 353, in async_device_update
    yield from self.hass.async_add_job(self.update)
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/sensor/radarr_upcoming_media.py", line 158, in update
    movie['poster_path'] = 'https://image.tmdb.org/t/p/w500{}'.format(tmdbjson['poster_path'])
KeyError: 'poster_path'

#98

There is quite alot of space in posterview for movies. Film studio is interesting, would a key/switch for radarr card showing film studio be a possibility for poster view?


#99

@jOOc Seems I missed yet another exception. Will be fixed later on today.

@M203 Working on having the extra info for movies be the physical release date if it’s a theater release and vice versa to fill it out a bit. Would you be more interested in having film studio or other info instead?

@Abeksis No banners yet. Banners are made by the community and not the studio and I have not found a reliable source for them. Meaning that some places that do have banners only have them for around 50% of releases.


#100

I think what you are suggesting is valid. I think film studio should be an option as well. More is more :slight_smile:


#101

Thinking about it, episode and movie descriptions might be a nice option and really fill the space.


#102

Updates

Upcoming Media Card:

  • Added extra info attribute, shows IMDb rating and studio name. Can show/hide and change color

Radarr:

  • Added the new extra attribute to sensor
  • Keyerror fix for poster_path @jOOc

Sonarr:

  • Added the new extra attribute to sensor

#103

I can’t see how to add new attributes to sensors? and the upcoming extra attributes?