mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-22 19:53:17 +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):
|
def fixMatch(self, searchResult=None, auto=False):
|
||||||
""" Use match result to update show metadata. """
|
""" Use match result to update show metadata. """
|
||||||
key = '/library/metadata/%s/match' % self.ratingKey
|
key = '/library/metadata/%s/match' % self.ratingKey
|
||||||
if not auto:
|
if auto:
|
||||||
if not searchResult:
|
|
||||||
raise NotFound('fixMatch() requires either auto=True or '
|
|
||||||
'searchResult=:class:`~plexapi.media.SearchResult.')
|
|
||||||
else:
|
|
||||||
searchResult = self.matches()[0]
|
searchResult = self.matches()[0]
|
||||||
|
elif not searchResult:
|
||||||
|
raise NotFound('fixMatch() requires either auto=True or '
|
||||||
|
'searchResult=:class:`~plexapi.media.SearchResult`.')
|
||||||
|
|
||||||
params = {'guid': searchResult.guid,
|
params = {'guid': searchResult.guid,
|
||||||
'name': searchResult.name}
|
'name': searchResult.name}
|
||||||
|
|
Loading…
Reference in a new issue