示例#1
0
 def to_dict(self):
     var = to_dict(self)
     var['poster'] = {
         'url': self.poster.url if self.poster else 'static.cinemax.club/media/images/default_poster.jpg',
         'small_url': self.poster.small_url if self.poster.name else 'static.cinemax.club/media/images/default_poster_small.jpg',
         'thumb_url': self.poster.thumb_url if self.poster.name else 'static.cinemax.club/media/images/default_poster_thumb.jpg'
     }
     var['type'] = 'movie'
     var['display_orders'] = self.display_orders
     var['display_clicks'] = self.display_clicks
     var['load'] = self.load
     var['display_load'] = self.display_load
     del(var['filename'])
     del(var['release'])
     del(var['synopsis'])
     del(var['provider_id'])
     del(var['visible'])
     del(var['fake_orders'])
     del(var['fake_clicks'])
     del(var['categories'])
     del(var['groups'])
     del(var['rand'])
     del(var['created_on'])
     del(var['updated_on'])
     return var
示例#2
0
 def to_dict(self):
     var = to_dict(self)
     var['title'] = self.title
     del(var['title_fr'])
     del(var['title_en'])
     del(var['title_de'])
     del(var['description'])
     return var
示例#3
0
 def to_dict(self):
     embed_code = self.get_embed_code(self.category.items_size)
     var = to_dict(self)
     var['embed_code'] = embed_code
     var['button_text'] = self.button_text
     var['href'] = self.get_href()
     var['title'] = self.title
     return var
示例#4
0
 def to_dict(self, target=None):
     movies_add_list = self.movies_add_list
     series_episodes_add_list = self.series_episodes_add_list
     movies_delete_list = self.movies_delete_list
     series_episodes_delete_list = self.series_episodes_delete_list
     member = self.member.to_dict()
     var = to_dict(self)
     var['member'] = member
     var['display_created_on'] = self.display_created_on
     media_add_list = [movie.to_dict() for movie in movies_add_list]
     media_add_list.extend([episode.to_dict() for episode in series_episodes_add_list])
     media_delete_list = [movie.to_dict() for movie in movies_delete_list]
     media_delete_list.extend([episode.to_dict() for episode in series_episodes_delete_list])
     var['movies_add_list'] = media_add_list
     var['movies_delete_list'] = media_delete_list
     return var
示例#5
0
 def to_dict(self):
     var = to_dict(self)
     var['poster'] = {
         'url': self.series.poster.url if self.series.poster else 'static.cinemax.club/media/images/default_poster.jpg',
         'small_url': self.series.poster.small_url if self.series.poster.name else 'static.cinemax.club/media/images/default_poster_small.jpg',
         'thumb_url': self.series.poster.thumb_url if self.series.poster.name else 'static.cinemax.club/media/images/default_poster_thumb.jpg'
     }
     var['type'] = 'series'
     var['orders'] = 'fake_orders'
     var['clicks'] = 'fake_clicks'
     var['load'] = self.load
     del(var['filename'])
     del(var['fake_orders'])
     del(var['created_on'])
     del(var['updated_on'])
     return var
示例#6
0
 def to_dict(self, target=None):
     movies_add_list = self.movies_add_list
     series_episodes_add_list = self.series_episodes_add_list
     movies_delete_list = self.movies_delete_list
     series_episodes_delete_list = self.series_episodes_delete_list
     member = self.member.to_dict()
     var = to_dict(self)
     var['member'] = member
     var['display_created_on'] = self.display_created_on
     media_add_list = [movie.to_dict() for movie in movies_add_list]
     media_add_list.extend(
         [episode.to_dict() for episode in series_episodes_add_list])
     media_delete_list = [movie.to_dict() for movie in movies_delete_list]
     media_delete_list.extend(
         [episode.to_dict() for episode in series_episodes_delete_list])
     var['movies_add_list'] = media_add_list
     var['movies_delete_list'] = media_delete_list
     return var
示例#7
0
 def to_dict(self):
     can_access_adult_content = self.get_can_access_adult_content()
     var = to_dict(self)
     var['can_access_adult_content'] = can_access_adult_content
     del(var['member'])
     return var
示例#8
0
 def to_dict(self):
     can_access_adult_content = self.get_can_access_adult_content()
     var = to_dict(self)
     var['can_access_adult_content'] = can_access_adult_content
     del (var['member'])
     return var