Send only text notification without art
if `entry["art"]` is empty `pms.get_image` will return `None` and previous implementation would return without sending any notification Now at lest the text notification without image will be sent
This commit is contained in:
parent
b77b361d2a
commit
52bbc4ffca
|
@ -44,9 +44,7 @@ async def send_entry(bot, room, entry):
|
||||||
if plexpy:
|
if plexpy:
|
||||||
pms = plexpy.pmsconnect.PmsConnect()
|
pms = plexpy.pmsconnect.PmsConnect()
|
||||||
pms_image = pms.get_image(entry["art"], 600, 300)
|
pms_image = pms.get_image(entry["art"], 600, 300)
|
||||||
if not pms_image:
|
if pms_image:
|
||||||
return
|
|
||||||
|
|
||||||
(blob, content_type) = pms_image
|
(blob, content_type) = pms_image
|
||||||
matrix_uri = await bot.upload_and_send_image(room, blob, "", True, content_type)
|
matrix_uri = await bot.upload_and_send_image(room, blob, "", True, content_type)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue