dnpwwo / Domoticz-Google-Plugin

MIT License
40 stars 10 forks source link

Update of adjusted_current_time #43

Open FilipDem opened 2 years ago

FilipDem commented 2 years ago

Hi, When playing a certain netflix series "Better than us", I got the following error when starting an episode.

2022-02-11 21:07:47.022 Error: Google: (Google) new_media_status: unsupported operand type(s) for +: 'NoneType' and 'float'
2022-02-11 21:07:47.023 Error: Google: (Google) <class 'TypeError'>, plugin.py, Line: 267

I was looking where the variable "status.adjusted_current_time" is set, however it seems to be set nowhere... I also noticed that when playing Netflix, the name of the series is not appearing "Status" device.

dnpwwo commented 1 year ago

adjusted_current_time is an attribute of the MediaStatus object but sometimes it is None. I've added a fix to catch the error.

The Netflix details must have changed. I'll have a look.