mirror of
https://github.com/mediacms-io/mediacms.git
synced 2025-11-20 13:36:05 -05:00
update versions for pre-commit (#741)
This commit is contained in:
@@ -102,7 +102,7 @@ class SearchRSSFeed(Feed):
|
||||
description = "Latest Media RSS feed"
|
||||
|
||||
def link(self, obj):
|
||||
return f"/rss/search"
|
||||
return "/rss/search"
|
||||
|
||||
def get_object(self, request):
|
||||
category = request.GET.get("c", "")
|
||||
|
||||
@@ -305,7 +305,6 @@ def show_related_media_author(media, request, limit):
|
||||
|
||||
|
||||
def show_related_media_calculated(media, request, limit):
|
||||
|
||||
"""Return a list of related media based on ML recommendations
|
||||
A big todo!
|
||||
"""
|
||||
|
||||
@@ -10,7 +10,6 @@ import files.models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = []
|
||||
|
||||
@@ -8,7 +8,6 @@ from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
|
||||
@@ -4,7 +4,6 @@ from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('files', '0002_auto_20201201_0712'),
|
||||
]
|
||||
|
||||
@@ -314,7 +314,6 @@ class Media(models.Model):
|
||||
self.__original_uploaded_poster = self.uploaded_poster
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
|
||||
if not self.title:
|
||||
self.title = self.media_file.path.split("/")[-1]
|
||||
|
||||
@@ -372,7 +371,6 @@ class Media(models.Model):
|
||||
# will run only when a poster is uploaded for the first time
|
||||
if self.uploaded_poster and self.uploaded_poster != self.__original_uploaded_poster:
|
||||
with open(self.uploaded_poster.path, "rb") as f:
|
||||
|
||||
# set this otherwise gets to infinite loop
|
||||
self.__original_uploaded_poster = self.uploaded_poster
|
||||
|
||||
@@ -580,9 +578,7 @@ class Media(models.Model):
|
||||
|
||||
# attempt to break media file in chunks
|
||||
if self.duration > settings.CHUNKIZE_VIDEO_DURATION and chunkize:
|
||||
|
||||
for profile in profiles:
|
||||
|
||||
if profile.extension == "gif":
|
||||
profiles.remove(profile)
|
||||
encoding = Encoding(media=self, profile=profile)
|
||||
|
||||
@@ -268,7 +268,6 @@ def encode_media(
|
||||
# return False
|
||||
|
||||
with tempfile.TemporaryDirectory(dir=settings.TEMP_DIRECTORY) as temp_dir:
|
||||
|
||||
tf = create_temp_file(suffix=".{0}".format(profile.extension), dir=temp_dir)
|
||||
tfpass = create_temp_file(suffix=".{0}".format(profile.extension), dir=temp_dir)
|
||||
ffmpeg_commands = produce_ffmpeg_commands(
|
||||
|
||||
Reference in New Issue
Block a user