Skip to content

Commit 112218e

Browse files
author
github-actions
committed
Fixup. Format code with Black
1 parent 2bb32d7 commit 112218e

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

pod/import_video/views.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
33
More information on this module at: https://www.esup-portail.org/wiki/x/BQCnSw
44
"""
5+
56
import logging
67
import os
78
import requests
@@ -752,10 +753,7 @@ def upload_youtube_recording_to_pod(request, record_id: int):
752753
# Use pytubefix to download Youtube file
753754
# Manage Proof of Origin Token generation
754755
# See https://pytubefix.readthedocs.io/en/latest/user/po_token.html
755-
yt_video = YouTube(
756-
source_url,
757-
'WEB'
758-
)
756+
yt_video = YouTube(source_url, "WEB")
759757
# Publish date (format: 2023-05-13 00:00:00)
760758
# Event date (format: 2023-05-13)
761759
date_evt = str(yt_video.publish_date)[0:10]
@@ -908,7 +906,9 @@ def upload_peertube_recording_to_pod(request, record_id: int) -> bool: # noqa:
908906
# Source video file
909907
if not pt_video_json["files"]:
910908
# Source video file for a playlist
911-
source_video_url = pt_video_json["streamingPlaylists"][0]["files"][0]["fileDownloadUrl"]
909+
source_video_url = pt_video_json["streamingPlaylists"][0]["files"][0][
910+
"fileDownloadUrl"
911+
]
912912
else:
913913
# Source video file for a video
914914
source_video_url = pt_video_json["files"][0]["fileDownloadUrl"]

pod/video/models.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1045,7 +1045,9 @@ def get_thumbnail_admin(self):
10451045
if self.thumbnail and self.thumbnail.file_exist():
10461046
# Handle exception to avoid sending an error email
10471047
try:
1048-
im = get_thumbnail(self.thumbnail.file, "100x100", crop="center", quality=72)
1048+
im = get_thumbnail(
1049+
self.thumbnail.file, "100x100", crop="center", quality=72
1050+
)
10491051
thumbnail_url = im.url
10501052
except Exception:
10511053
thumbnail_url = static(DEFAULT_THUMBNAIL)

0 commit comments

Comments
 (0)