forked from 0x2620/pandora
refine description, fixes #1397
This commit is contained in:
parent
58bac6981f
commit
31d28e733d
4 changed files with 18 additions and 12 deletions
|
|
@ -594,6 +594,14 @@ class Item(models.Model):
|
|||
return info
|
||||
return i
|
||||
|
||||
def get_item_description(self):
|
||||
if settings.USE_IMDB:
|
||||
info = tuple([self.data.get(k, 0) for k in ['hue', 'saturation', 'lightness']])
|
||||
description = 'Hue: %.3f, Saturation: %.3f, Lightness: %.3f' % info
|
||||
else:
|
||||
description = ox.strip_tags(self.get('summary', ''))
|
||||
return description
|
||||
|
||||
def oxdb_id(self):
|
||||
if not self.get('title') and not self.get('director'):
|
||||
return self.itemId
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue