mirror of
https://github.com/mediacms-io/mediacms.git
synced 2025-11-21 13:57:57 -05:00
Bulk actions support (#1418)
This commit is contained in:
@@ -357,6 +357,10 @@ class Media(models.Model):
|
||||
a_tags,
|
||||
b_tags,
|
||||
]
|
||||
|
||||
for subtitle in self.subtitles.all():
|
||||
items.append(subtitle.subtitle_text)
|
||||
|
||||
items = [item for item in items if item]
|
||||
text = " ".join(items)
|
||||
text = " ".join([token for token in text.lower().split(" ") if token not in STOP_WORDS])
|
||||
@@ -406,11 +410,11 @@ class Media(models.Model):
|
||||
self.media_type = "image"
|
||||
elif kind == "pdf":
|
||||
self.media_type = "pdf"
|
||||
|
||||
if self.media_type in ["audio", "image", "pdf"]:
|
||||
if self.media_type in ["image", "pdf"]:
|
||||
self.encoding_status = "success"
|
||||
else:
|
||||
ret = helpers.media_file_info(self.media_file.path)
|
||||
|
||||
if ret.get("fail"):
|
||||
self.media_type = ""
|
||||
self.encoding_status = "fail"
|
||||
|
||||
Reference in New Issue
Block a user