From cd635ea69e41d2a499aef92ef43e9ca0e122f087 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Wed, 8 Nov 2023 22:53:40 +0100 Subject: [PATCH] [`torrent`] Fixed duration and image for TV series results. --- platypush/plugins/torrent/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platypush/plugins/torrent/__init__.py b/platypush/plugins/torrent/__init__.py index 3b0cd043f3..edb0ec67a7 100644 --- a/platypush/plugins/torrent/__init__.py +++ b/platypush/plugins/torrent/__init__.py @@ -235,7 +235,7 @@ class TorrentPlugin(Plugin): + f'[S{episode.get("season", 0):02d}E{episode.get("episode", 0):02d}] ' + f'{episode.get("title", "[No Title]")} [tv][{quality}]' ), - 'duration': int(result.get('runtime') or 0), + 'duration': int(result.get('runtime') or 0) * 60, 'year': int(result.get('year') or 0), 'synopsis': result.get('synopsis'), 'overview': episode.get('overview'), @@ -246,7 +246,7 @@ class TorrentPlugin(Plugin): 'network': result.get('network'), 'status': result.get('status'), 'genres': result.get('genres', []), - 'images': result.get('images', []), + 'image': result.get('images', {}).get('fanart'), 'rating': result.get('rating', {}), 'quality': quality, 'provider': item.get('provider'),