Skip to content

Commit

Permalink
Merge pull request #128 from crgwbr/fix_enum_properties
Browse files Browse the repository at this point in the history
Fix "AttributeError: 'str' object has no attribute 'name'"
  • Loading branch information
seb-b authored Jun 2, 2024
2 parents fd684ff + 69c64f8 commit 4e68e8e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion wagtailvideos/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def video_tag(self, attrs=None):
transcodes = self.get_current_transcodes()
sources = []
for transcode in transcodes:
sources.append("<source src='{0}' type='video/{1}' >".format(transcode.url, transcode.media_format.name))
sources.append("<source src='{0}' type='video/{1}' >".format(transcode.url, transcode.media_format))

sources.append("<source src='{0}' type='{1}'>"
.format(self.url, self.content_type))
Expand Down
2 changes: 1 addition & 1 deletion wagtailvideos/transcoders/ffmpeg/ffmpeg.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def run(self):

output_dir = tempfile.mkdtemp()
transcode_name = "{0}.{1}".format(
video.filename(include_ext=False), media_format.name
video.filename(include_ext=False), media_format
)

output_file = os.path.join(output_dir, transcode_name)
Expand Down

0 comments on commit 4e68e8e

Please sign in to comment.