subtitles available

This commit is contained in:
j 2011-08-26 17:43:31 +02:00
parent 68844b6ed0
commit 56b292619d

View file

@ -151,7 +151,10 @@ class File(models.Model):
def save(self, *args, **kwargs): def save(self, *args, **kwargs):
if self.auto: if self.auto:
self.set_state() self.set_state()
self.available = self.streams.filter(source=None, available=True).count() > 0 if self.is_subtitle:
self.available = self.data and True or False
else:
self.available = self.streams.filter(source=None, available=True).count() > 0
super(File, self).save(*args, **kwargs) super(File, self).save(*args, **kwargs)
#upload and data handling #upload and data handling