Skip to content

Commit ff48449

Browse files
committed
Fix sync.get_watched to use proper endpoint
1 parent 69936fb commit ff48449

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

trakt/sync.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -351,22 +351,25 @@ def get_watchlist(list_type=None, sort=None):
351351
yield results
352352

353353

354-
@deprecated("This method returns watchlist, not watched list. "
355-
"This will be fixed in PyTrakt 4.x to return watched list")
356354
@get
357355
def get_watched(list_type=None, extended=None):
358-
"""Return all movies or shows a user has watched sorted by most plays.
356+
"""Returns all movies or shows a user has watched sorted by most plays.
357+
358+
If type is set to shows and you add ?extended=noseasons to the URL,
359+
it won't return season or episode info.
359360
360361
:param list_type: Optional Filter by a specific type.
361362
Possible values: movies, shows, seasons or episodes.
362363
:param extended: Optional value for requesting extended information.
364+
365+
https://trakt.docs.apiary.io/#reference/sync/get-watched/get-watched
363366
"""
364-
valid_type = ('movies', 'shows', 'seasons', 'episodes')
367+
valid_type = ('movies', 'shows')
365368

366369
if list_type and list_type not in valid_type:
367370
raise ValueError('list_type must be one of {}'.format(valid_type))
368371

369-
uri = 'sync/watchlist'
372+
uri = 'sync/watched'
370373
if list_type:
371374
uri += '/{}'.format(list_type)
372375

0 commit comments

Comments
 (0)