
    lj                          G d  d      Z y)c                   0    e Zd ZdZddZddZddZddZy)WatchlistMixinzA Mixin for Plex objects that can be added to a user's watchlist. Nc                     	 |xs | j                   j                         }|j                  |       S # t        $ r | j                   }Y (w xY w)a   Returns True if the item is on the user's watchlist.
            Also see :func:`~plexapi.myplex.MyPlexAccount.onWatchlist`.

            Parameters:
                account (:class:`~plexapi.myplex.MyPlexAccount`, optional): Account to check item on the watchlist.
                   Note: This is required if you are not connected to a Plex server instance using the admin account.
        )_servermyPlexAccountAttributeErroronWatchlistselfaccounts     E/DATA/.local/lib/python3.12/site-packages/plexapi/mixins/watchlist.pyr   zWatchlistMixin.onWatchlist   sK    	#=!;!;!=G ""4((  	#llG	#s   1 A	A	c                     	 |xs | j                   j                         }|j                  |        | S # t        $ r | j                   }Y *w xY w)a   Add this item to the specified user's watchlist.
            Also see :func:`~plexapi.myplex.MyPlexAccount.addToWatchlist`.

            Parameters:
                account (:class:`~plexapi.myplex.MyPlexAccount`, optional): Account to add item to the watchlist.
                   Note: This is required if you are not connected to a Plex server instance using the admin account.
        )r   r   r   addToWatchlistr	   s     r   r   zWatchlistMixin.addToWatchlist   sM    	#=!;!;!=G 	t$  	#llG	#   3 A
Ac                     	 |xs | j                   j                         }|j                  |        | S # t        $ r | j                   }Y *w xY w)a   Remove this item from the specified user's watchlist.
            Also see :func:`~plexapi.myplex.MyPlexAccount.removeFromWatchlist`.

            Parameters:
                account (:class:`~plexapi.myplex.MyPlexAccount`, optional): Account to remove item from the watchlist.
                   Note: This is required if you are not connected to a Plex server instance using the admin account.
        )r   r   r   removeFromWatchlistr	   s     r   r   z"WatchlistMixin.removeFromWatchlist!   sM    	#=!;!;!=G 	##D)  	#llG	#r   c                    	 |xs | j                   j                         }| j                  j	                  dd      d   }|j                  |j                   d| d      }| j                  |      S # t        $ r | j                   }Y hw xY w)a   Return a list of :class:`~plexapi.media.Availability`
            objects for the available streaming services for this item.

            Parameters:
                account (:class:`~plexapi.myplex.MyPlexAccount`, optional): Account used to retrieve availability.
                   Note: This is required if you are not connected to a Plex server instance using the admin account.
        /   z/library/metadata/z/availabilities)r   r   r   guidrsplitqueryMETADATA	findItems)r
   r   	ratingKeydatas       r   streamingServicesz WatchlistMixin.streamingServices0   s    	#=!;!;!=G II$$S!,R0	}} 0 011CI;o^_~~d##	  	#llG	#s   A1 1B	B	)N)__name__
__module____qualname____doc__r   r   r   r        r   r   r      s    K)$r#   r   N)r   r"   r#   r   <module>r$      s   =$ =$r#   