def _update(self, info=None, **kwargs): super(Show, self)._update(info, **kwargs) update_attributes(self, info, ["title", "watchers"]) # trending if info.get("year"): self.year = int(info["year"])
def _update(self, info=None, **kwargs): if not info: return super(Episode, self)._update(info, **kwargs) update_attributes( self, info, [ 'title', # Extended Info 'available_translations', 'runtime', ]) # Extended Info if 'first_aired' in info: self.first_aired = from_iso8601_datetime(info.get('first_aired')) if 'updated_at' in info: self.updated_at = from_iso8601_datetime(info.get('updated_at')) if 'number_abs' in info: self.number_abs = info.get('number_abs')
def _update(self, info=None, in_watchlist=None, **kwargs): if not info: return update_attributes( self, info, [ # Extended Info 'overview', # Search 'score' ]) if 'images' in info: self.images = info['images'] # Set timestamps if 'listed_at' in info: self.listed_at = from_iso8601_datetime(info.get('listed_at')) # Set flags if in_watchlist is not None: self.in_watchlist = in_watchlist self.rating = Rating._construct(self._client, info) or self.rating
def _update(self, info=None, **kwargs): if not info: return super(Movie, self)._update(info, **kwargs) update_attributes(self, info, [ 'title', # Trending 'watchers', # Extended Info 'tagline', 'certification', 'homepage', 'trailer', 'language', 'available_translations', 'genres' ]) # Ensure `year` attribute is an integer (fixes incorrect type returned by search) if info.get('year'): self.year = int(info['year']) # Extended Info if info.get('runtime'): self.runtime = info['runtime'] if 'released' in info: self.released = from_iso8601_date(info.get('released')) if 'updated_at' in info: self.updated_at = from_iso8601_datetime(info.get('updated_at'))
def _update(self, info=None): super(PublicList, self)._update(info) if not info: return update_attributes(self, info, ['comment_total', 'like_total'])
def _update(self, info=None, is_watched=None, is_collected=None, **kwargs): if not info: return super(Video, self)._update(info, **kwargs) update_attributes(self, info, ['progress']) if 'action' in info: self.action = info.get('action') if 'id' in info: self.id = info.get('id') # Set timestamps if 'collected_at' in info: self.collected_at = from_iso8601_datetime(info.get('collected_at')) if 'paused_at' in info: self.paused_at = from_iso8601_datetime(info.get('paused_at')) if 'watched_at' in info: self.watched_at = from_iso8601_datetime(info.get('watched_at')) # Set flags if is_watched is not None: self.is_watched = is_watched if is_collected is not None: self.is_collected = is_collected
def _update(self, info=None): if not info: return super(CustomList, self)._update(info) update_attributes(self, info, ['privacy'])
def _update(self, info=None, **kwargs): if not info: return update_attributes(self, info, [ 'aired', 'completed' ])
def _update(self, info=None): if not info: return super(CustomList, self)._update(info) update_attributes(self, info, [ 'privacy' ])
def _update(self, info=None, **kwargs): if not info: return update_attributes(self, info, ['name']) # Set timestamps if 'listed_at' in info: self.listed_at = from_iso8601_datetime(info.get('listed_at'))
def _update(self, info=None, **kwargs): super(Movie, self)._update(info, **kwargs) update_attributes(self, info, [ 'title', 'watchers' # trending ]) if info.get('year'): self.year = int(info['year'])
def _update(self, info=None): if not info: return if 'updated_at' in info: self.updated_at = from_iso8601(info.get('updated_at')) update_attributes(self, info, [ 'name', 'description', 'likes', 'allow_comments', 'display_numbers', 'comment_count', 'item_count' ])
def _update(self, info=None, **kwargs): if not info: return update_attributes(self, info, [ 'name' ]) # Set timestamps if 'listed_at' in info: self.listed_at = from_iso8601_datetime(info.get('listed_at'))
def _update(self, info=None): if not info: return if 'followed_at' in info: self.followed_at = from_iso8601_datetime(info.get('followed_at')) if 'friends_at' in info: self.friends_at = from_iso8601_datetime(info.get('friends_at')) update_attributes(self, info, ['username', 'name', 'private', 'vip', 'vip_ep'])
def _update(self, info=None): if not info: return super(CustomList, self)._update(info) update_attributes(self, info, ['privacy']) # Update with user details user = info.get('user', {}) if user.get('username'): self.username = user['username']
def _update(self, info=None): if not info: return if 'created_at' in info: self.created_at = from_iso8601_datetime(info.get('created_at')) if 'liked_at' in info: self.liked_at = from_iso8601_datetime(info.get('liked_at')) update_attributes(self, info, [ 'parent_id', 'comment', 'spoiler', 'review', 'replies', 'likes', 'user', 'user_rating' ])
def _update(self, info=None, **kwargs): if not info: return super(Season, self)._update(info, **kwargs) update_attributes(self, info, [ # Extended Info 'episode_count', 'aired_episodes' ]) # Extended Info if 'first_aired' in info: self.first_aired = from_iso8601_datetime(info.get('first_aired'))
def _update(self, info=None): if not info: return super(CustomList, self)._update(info) update_attributes(self, info, [ 'privacy' ]) # Update with user details user = info.get('user', {}) if user.get('username'): self.username = user['username']
def _update(self, info=None, **kwargs): if not info: return super(Show, self)._update(info, **kwargs) update_attributes( self, info, [ 'title', # Watched, Collected, and Played 'watcher_count', 'play_count', 'collected_count', 'collector_count', # Recommended 'user_count', # Trending 'watchers', # Extended Info 'airs', 'runtime', 'certification', 'network', 'country', 'status', 'homepage', 'language', 'available_translations', 'genres', 'aired_episodes' ]) # Ensure `year` attribute is an integer (fixes incorrect type returned by search) if info.get('year'): self.year = int(info['year']) # Extended Info if 'first_aired' in info: self.first_aired = from_iso8601_datetime(info.get('first_aired')) if 'updated_at' in info: self.updated_at = from_iso8601_datetime(info.get('updated_at'))
def _update(self, info=None): if not info: return if 'created_at' in info: self.updated_at = from_iso8601_datetime(info.get('updated_at')) if 'liked_at' in info: self.liked_at = from_iso8601_datetime(info.get('liked_at')) if 'updated_at' in info: self.updated_at = from_iso8601_datetime(info.get('updated_at')) update_attributes(self, info, [ 'name', 'description', 'privacy', 'likes', 'allow_comments', 'display_numbers', 'sort_by', 'sort_how', 'comment_count', 'item_count' ])
def _update(self, info=None, **kwargs): if not info: return super(Season, self)._update(info, **kwargs) update_attributes( self, info, [ # Extended Info "episode_count", "aired_episodes", ], ) # Extended Info if "first_aired" in info: self.first_aired = from_iso8601_datetime(info.get("first_aired"))
def _update(self, info=None, **kwargs): if not info: return super(Episode, self)._update(info, **kwargs) update_attributes(self, info, [ 'title', # Extended Info 'available_translations' ]) # Extended Info if 'first_aired' in info: self.first_aired = from_iso8601_datetime(info.get('first_aired')) if 'updated_at' in info: self.updated_at = from_iso8601_datetime(info.get('updated_at'))
def _update(self, info=None, in_watchlist=None, **kwargs): if not info: return update_attributes(self, info, [ 'overview', 'images', 'score' ]) # Set timestamps if 'listed_at' in info: self.listed_at = from_iso8601(info.get('listed_at')) # Set flags if in_watchlist is not None: self.in_watchlist = in_watchlist self.rating = Rating._construct(self._client, info) or self.rating
def _update(self, info=None, is_watched=None, is_collected=None, **kwargs): super(Video, self)._update(info, **kwargs) update_attributes(self, info, ['plays', 'progress']) # Set timestamps if 'last_watched_at' in info: self.last_watched_at = from_iso8601(info.get('last_watched_at')) if 'collected_at' in info: self.collected_at = from_iso8601(info.get('collected_at')) if 'paused_at' in info: self.paused_at = from_iso8601(info.get('paused_at')) # Set flags if is_watched is not None: self.is_watched = is_watched if is_collected is not None: self.is_collected = is_collected
def _update(self, info=None, **kwargs): if not info: return super(Show, self)._update(info, **kwargs) update_attributes(self, info, [ 'title', # Trending 'watchers', # Extended Info 'airs', 'runtime', 'certification', 'network', 'country', 'status', 'homepage', 'language', 'available_translations', 'genres', 'aired_episodes' ]) # Ensure `year` attribute is an integer (fixes incorrect type returned by search) if info.get('year'): self.year = int(info['year']) # Extended Info if 'first_aired' in info: self.first_aired = from_iso8601_datetime(info.get('first_aired')) if 'updated_at' in info: self.updated_at = from_iso8601_datetime(info.get('updated_at'))
def _update(self, info=None, is_watched=None, is_collected=None, **kwargs): if not info: return super(Video, self)._update(info, **kwargs) update_attributes(self, info, [ 'plays', 'progress' ]) if 'action' in info: self.action = info.get('action') if 'id' in info: self.id = info.get('id') # Set timestamps if 'last_watched_at' in info: self.last_watched_at = from_iso8601_datetime(info.get('last_watched_at')) if 'collected_at' in info: self.collected_at = from_iso8601_datetime(info.get('collected_at')) if 'paused_at' in info: self.paused_at = from_iso8601_datetime(info.get('paused_at')) if 'watched_at' in info: self.watched_at = from_iso8601_datetime(info.get('watched_at')) # Set flags if is_watched is not None: self.is_watched = is_watched if is_collected is not None: self.is_collected = is_collected
def _update(self, info=None, is_watched=None, is_collected=None, **kwargs): super(Video, self)._update(info, **kwargs) update_attributes(self, info, [ 'plays', 'progress' ]) # Set timestamps if 'last_watched_at' in info: self.last_watched_at = from_iso8601(info.get('last_watched_at')) if 'collected_at' in info: self.collected_at = from_iso8601(info.get('collected_at')) if 'paused_at' in info: self.paused_at = from_iso8601(info.get('paused_at')) # Set flags if is_watched is not None: self.is_watched = is_watched if is_collected is not None: self.is_collected = is_collected
def _update(self, info=None): if not info: return update_attributes(self, info, ['name'])
def _update(self, info=None, **kwargs): super(Episode, self)._update(info, **kwargs) update_attributes(self, info, ['title'])