update versions for pre-commit (#741)

This commit is contained in:
Markos Gogoulos
2023-03-14 14:09:52 +02:00
committed by GitHub
parent 4b0718c43f
commit a3997bfb1c
15 changed files with 21 additions and 19 deletions

View File

@@ -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", "")

View File

@@ -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!
"""

View File

@@ -10,7 +10,6 @@ import files.models
class Migration(migrations.Migration):
initial = True
dependencies = []

View File

@@ -8,7 +8,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [

View File

@@ -4,7 +4,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('files', '0002_auto_20201201_0712'),
]

View File

@@ -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)

View File

@@ -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(