forked from 0x2620/pandora
languages
This commit is contained in:
parent
1523a81007
commit
d6c17eba5b
2 changed files with 2 additions and 2 deletions
|
@ -410,7 +410,7 @@ class Item(models.Model):
|
|||
ll = layers.setdefault(l.name, [])
|
||||
qs = Annotation.objects.filter(layer=l, item=self)
|
||||
if l.private:
|
||||
if user.is_anonymous():
|
||||
if user and user.is_anonymous():
|
||||
user = None
|
||||
qs = qs.filter(user=user)
|
||||
for a in qs.order_by('start'):
|
||||
|
|
|
@ -45,7 +45,7 @@ def load_subtitles(itemId):
|
|||
languages = [f.language for f in item.files.filter(is_main=True, is_subtitle=True,
|
||||
available=True)]
|
||||
if languages:
|
||||
if 'en' in languages:
|
||||
if 'en' in languages or '' in languages:
|
||||
language = 'en'
|
||||
else:
|
||||
language = languages[0]
|
||||
|
|
Loading…
Reference in a new issue