Skip to content

Commit 2fede8e

Browse files
authored
Make clearer logging when there isn't a metadata field.
I just wanted to know what libraries were causing this so I added this in...
1 parent 9c238d8 commit 2fede8e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

custom_components/sensor/plex_recently_added.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ def update(self):
210210
try:
211211
self.api_json += sub_sec.json()['MediaContainer']['Metadata']
212212
except:
213-
_LOGGER.warning('No Metadata field in this library')
213+
_LOGGER.warning('No Metadata field for "{}"'.format(sub_sec.json()['MediaContainer']['librarySectionTitle']))
214214
pass
215215
self.api_json = sorted(self.api_json, key=lambda i: i['addedAt'],
216216
reverse=True)[:self.max_items]

0 commit comments

Comments
 (0)