mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-27 06:00:24 +00:00
15 lines
553 B
Python
Executable file
15 lines
553 B
Python
Executable file
#!/usr/bin/env python3
|
|
# -*- coding: utf-8 -*-
|
|
"""
|
|
This will find every item marked with the collection 'markwatched' and mark
|
|
it watched. Just set run every so often in a scheduled task. This will only
|
|
work for the user you connect to the PlexServer as.
|
|
"""
|
|
from plexapi.server import PlexServer
|
|
|
|
plex = PlexServer()
|
|
for section in plex.library.sections():
|
|
if section.type in ('movie', 'artist', 'show'):
|
|
for item in section.search(collection='markwatched'):
|
|
print('Marking %s watched.' % item.title)
|
|
item.watched()
|