From a120f52e0df58f45432e622eacc88f40b34c051a Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Tue, 13 Oct 2020 09:15:45 -0700 Subject: [PATCH] Add grandparentTitle to m3u8 export --- plexpy/exporter.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plexpy/exporter.py b/plexpy/exporter.py index 2d3baa70..ce9ef674 100644 --- a/plexpy/exporter.py +++ b/plexpy/exporter.py @@ -1880,10 +1880,14 @@ class Export(object): for d in data: if d.get('locations', []): + if 'grandparentTitle' in d: + full_title = '{} - {}'.format(d.get('originalTitle') or d['grandparentTitle'], d['title']) + else: + full_title = d['title'] location = { 'ratingKey': d['ratingKey'], 'duration': d['duration'], - 'title': d['title'], + 'title': full_title, 'location': d['locations'][0] } items.append(location)