forked from rc/aircox
- player bug in admin fix
- player rendering issue fix - station.streams property - glitch in template rendering when page parent is not published
This commit is contained in:
@ -2,6 +2,7 @@ import os
|
||||
|
||||
from django.db import models
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.utils.functional import cached_property
|
||||
|
||||
from filer.fields.image import FilerImageField
|
||||
|
||||
@ -74,6 +75,11 @@ class Station(models.Model):
|
||||
|
||||
objects = StationQuerySet.as_manager()
|
||||
|
||||
@cached_property
|
||||
def streams(self):
|
||||
""" Audio streams as list of urls. """
|
||||
return self.audio_streams.split('\n') if self.audio_streams else []
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
|
Reference in New Issue
Block a user