Skip to content

Commit 28d8b86

Browse files
committed
detailed example for using matches method
thanks @JonnyWong16
1 parent e44513c commit 28d8b86

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

plexapi/base.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,25 @@ def matches(self, auto=False, agent=None, title=None, year=None, language=None):
445445
title (str): Title of item to search for
446446
year (str): Year of item to search in
447447
language (str) : Language of item to search in
448+
449+
Examples:
450+
1. video.matches()
451+
2. video.matches(title="something", year=2020)
452+
3. video.matches(title="something")
453+
4. video.matches(year=2020)
454+
5. video.matches(title="something", year="")
455+
6. video.matches(title="", year=2020)
456+
7. video.matches(title="", year="")
457+
458+
1. The default behaviour in Plex Web = no params in plexapi
459+
2. Both title and year specified by user
460+
3. Year automatically filled in
461+
4. Title automatically filled in
462+
5. Explicitly searches for title with blank year
463+
6. Explicitly searches for blank title with year
464+
7. I don't know what the user is thinking... return the same result as 1
465+
466+
For 2 to 7, the agent and language is automatically filled in
448467
"""
449468
key = '/library/metadata/%s/matches' % self.ratingKey
450469
params = {'manual': 1}

0 commit comments

Comments
 (0)