add track to sound when scanning, using file's metadata (add mutagen as dep)

This commit is contained in:
bkfox
2016-11-28 17:09:46 +01:00
parent aa1c21a8c8
commit 0141d5174d
6 changed files with 141 additions and 67 deletions

View File

@ -462,6 +462,7 @@ class DatedListBase(models.Model):
# context dict
return {
'nav_dates': {
'today': today,
'date': date,
'next': next,
'prev': prev,
@ -935,12 +936,14 @@ class SectionLogsList(SectionItem):
print(log, type(log))
if type(log) == aircox.models.Diffusion:
return DiffusionPage.as_item(log)
related = log.related
return ListItem(
title = '{artist} -- {title}'.format(
artist = log.related.artist,
title = log.related.title,
artist = related.artist,
title = related.title,
),
summary = log.related.info,
summary = related.info,
date = log.date,
info = '',
css_class = 'track'