File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed
Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -488,6 +488,11 @@ def iterParts(self):
488488 for part in item .parts :
489489 yield part
490490
491+ def split (self ):
492+ """Split a duplicate."""
493+ key = '%s/split' % self .key
494+ return self ._server .query (key )
495+
491496 def play (self , client ):
492497 """ Start playback on the specified client.
493498
Original file line number Diff line number Diff line change @@ -361,6 +361,22 @@ def webhooks(self):
361361 self ._webhooks = self .listAttrs (data , 'url' , etag = 'webhook' )
362362 return self ._webhooks
363363
364+ def opt (self , playback = None , library = None ):
365+ """Opt in or out of sharing stuff with plex. See
366+
367+ https://www.plex.tv/about/privacy-legal/
368+
369+ """
370+ params = {}
371+ if playback is not None :
372+ params ['optOutPlayback' ] = int (playback )
373+ if library is not None :
374+ params ['optOutLibraryStats' ] = int (library )
375+
376+ url = 'https://plex.tv/api/v2/user/privacy'
377+
378+ return self .query (url , method = self ._session .put , ** dict (params = params ))
379+
364380
365381class MyPlexUser (PlexObject ):
366382 """ This object represents non-signed in users such as friends and linked
You can’t perform that action at this time.
0 commit comments