always update sort_path
This commit is contained in:
parent
53436967ed
commit
1bec444f66
1 changed files with 1 additions and 1 deletions
|
@ -75,7 +75,6 @@ class File(models.Model):
|
||||||
|
|
||||||
def set_state(self):
|
def set_state(self):
|
||||||
self.path = self.create_path()
|
self.path = self.create_path()
|
||||||
self.sort_path= utils.sort_string(self.path)
|
|
||||||
|
|
||||||
if not os.path.splitext(self.path)[-1] in (
|
if not os.path.splitext(self.path)[-1] in (
|
||||||
'.srt', '.rar', '.sub', '.idx', '.txt', '.jpg', '.png', '.nfo') \
|
'.srt', '.rar', '.sub', '.idx', '.txt', '.jpg', '.png', '.nfo') \
|
||||||
|
@ -146,6 +145,7 @@ 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.sort_path= utils.sort_string(self.path)
|
||||||
if self.is_subtitle:
|
if self.is_subtitle:
|
||||||
self.available = self.data and True or False
|
self.available = self.data and True or False
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue