bazarr/libs/plex/objects/mixins/rate.py

11 lines
294 B
Python
Raw Normal View History

2018-10-31 16:08:29 +00:00
from plex import Plex
from plex.objects.core.base import Property, DescriptorMixin
class RateMixin(DescriptorMixin):
rating = Property(type=float)
user_rating = Property('userRating', type=float)
def rate(self, value):
return Plex['library'].rate(self.rating_key, value)