diff --git a/pandora/archive/models.py b/pandora/archive/models.py index 83dc6335c..9c03e554c 100644 --- a/pandora/archive/models.py +++ b/pandora/archive/models.py @@ -14,7 +14,6 @@ from django.db.models.signals import pre_delete from ox.django import fields import ox -from ox.normalize import canonicalTitle import chardet from item import utils @@ -79,7 +78,7 @@ class File(models.Model): def set_state(self): self.name = self.get_name() self.folder = self.get_folder() - self.sort_name = utils.sort_string(canonicalTitle(self.name)) + self.sort_name = utils.sort_string(ox.get_sort_title(self.name)) if not os.path.splitext(self.name)[-1] in ( '.srt', '.rar', '.sub', '.idx', '.txt', '.jpg', '.png', '.nfo') \ diff --git a/pandora/person/models.py b/pandora/person/models.py index 8a5cf554f..226c132a3 100644 --- a/pandora/person/models.py +++ b/pandora/person/models.py @@ -34,7 +34,7 @@ class Person(models.Model): def save(self, *args, **kwargs): if not self.name_sort: - self.name_sort = ox.normalize.canonicalName(self.name) + self.name_sort = ox.get_sort_name(self.name) self.name_sort = unicodedata.normalize('NFKD', self.name_sort) self.numberofnames = len(self.name.split(' ')) super(Person, self).save(*args, **kwargs) diff --git a/pandora/title/models.py b/pandora/title/models.py index 3c06682c6..4b3083267 100644 --- a/pandora/title/models.py +++ b/pandora/title/models.py @@ -28,7 +28,7 @@ class Title(models.Model): def save(self, *args, **kwargs): if not self.title_sort: - self.title_sort = ox.normalize.canonicalTitle(self.title) + self.title_sort = ox.get_sort_title(self.title) self.title_sort = unicodedata.normalize('NFKD', self.title_sort) super(Title, self).save(*args, **kwargs)