mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-10 22:24:12 +00:00
fixMatch rework not so not-y
This commit is contained in:
parent
86c722f8bd
commit
07cf7d16e4
1 changed files with 4 additions and 5 deletions
|
@ -470,12 +470,11 @@ class PlexPartialObject(PlexObject):
|
|||
def fixMatch(self, searchResult=None, auto=False):
|
||||
""" Use match result to update show metadata. """
|
||||
key = '/library/metadata/%s/match' % self.ratingKey
|
||||
if not auto:
|
||||
if not searchResult:
|
||||
raise NotFound('fixMatch() requires either auto=True or '
|
||||
'searchResult=:class:`~plexapi.media.SearchResult.')
|
||||
else:
|
||||
if auto:
|
||||
searchResult = self.matches()[0]
|
||||
elif not searchResult:
|
||||
raise NotFound('fixMatch() requires either auto=True or '
|
||||
'searchResult=:class:`~plexapi.media.SearchResult`.')
|
||||
|
||||
params = {'guid': searchResult.guid,
|
||||
'name': searchResult.name}
|
||||
|
|
Loading…
Reference in a new issue