From 0e44255e6a12b2a3dcbd6b0992695b24635042cb Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Fri, 16 Oct 2020 12:31:34 -0700 Subject: [PATCH] Export photo locations --- plexpy/exporter.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plexpy/exporter.py b/plexpy/exporter.py index e0d25e71..20e65f10 100644 --- a/plexpy/exporter.py +++ b/plexpy/exporter.py @@ -936,6 +936,7 @@ class Export(object): 'librarySectionID': None, 'librarySectionKey': None, 'librarySectionTitle': None, + 'locations': None, 'originallyAvailableAt': partial(helpers.datetime_to_iso, to_date=True), 'parentGuid': None, 'parentIndex': None, @@ -1379,7 +1380,7 @@ class Export(object): } _media_info_levels = { 1: [ - 'media.aspectRatio', 'media.aperture', + 'locations', 'media.aspectRatio', 'media.aperture', 'media.container', 'media.height', 'media.width', 'media.iso', 'media.lens', 'media.make', 'media.model' ], @@ -1390,7 +1391,7 @@ class Export(object): 3: [ ], 9: [ - 'media' + 'locations', 'media' ] } return _metadata_levels, _media_info_levels @@ -1934,7 +1935,7 @@ class Export(object): metadata = { 'type': d['type'], 'ratingKey': d['ratingKey'], - 'duration': d['duration'], + 'duration': d.get('duration', 5), 'title': full_title, 'location': '\n'.join(d['locations']) # Add all locations }