Sonu Kumar 2023-11-20 20:39:00 -07:00 zatwierdzone przez GitHub
commit 2e00b8f576
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 5 dodań i 1 usunięć

Wyświetl plik

@ -787,7 +787,11 @@ class Media(models.Model):
"""
ret = []
for subtitle in self.subtitles.all():
# Retrieve all subtitles and sort by the first letter of their associated language's title
sorted_subtitles = sorted(self.subtitles.all(), key=lambda s: s.language.title[0])
for subtitle in sorted_subtitles:
ret.append(
{
"src": helpers.url_from_path(subtitle.subtitle_file.path),