Skip to content

Commit

Permalink
Temporary fix for info pages with missing metadata
Browse files Browse the repository at this point in the history
* Will be fixed properly in v2
  • Loading branch information
JonnyWong16 committed Oct 14, 2016
1 parent 86a9230 commit 4e04310
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion plexpy/pmsconnect.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,6 @@ def get_metadata_details(self, rating_key='', get_media_info=False):
for a in xml_head:
if a.getAttribute('size'):
if a.getAttribute('size') != '1':
metadata_list = {'metadata': None}
return metadata_list

if a.getElementsByTagName('Directory'):
Expand Down
4 changes: 2 additions & 2 deletions plexpy/webserve.py
Original file line number Diff line number Diff line change
Expand Up @@ -3245,14 +3245,14 @@ def info(self, rating_key=None, source=None, query=None, **kwargs):
if source == 'history':
data_factory = datafactory.DataFactory()
result = data_factory.get_metadata_details(rating_key=rating_key)
if result:
if result and result['metadata']:
metadata = result['metadata']
poster_url = data_factory.get_poster_url(metadata=metadata)
metadata['poster_url'] = poster_url
else:
pms_connect = pmsconnect.PmsConnect()
result = pms_connect.get_metadata_details(rating_key=rating_key, get_media_info=True)
if result:
if result and result['metadata']:
metadata = result['metadata']
data_factory = datafactory.DataFactory()
poster_url = data_factory.get_poster_url(metadata=metadata)
Expand Down

0 comments on commit 4e04310

Please sign in to comment.