kopia lustrzana https://codeberg.org/mister_monster/YouTube2Peertube
Catch crash when trying to upload a not available video file (#18)
This happens for example when a Live Stream is scheduled on a YT-Channel. In this case the download of the video file is not possible and therefore the attempt to upload leads to a crash.pull/19/head
rodzic
9395712a05
commit
fbc28562a5
|
@ -166,6 +166,7 @@ def upload_to_pt(dl_dir, channel_conf, queue_item, access_token, thumb_extension
|
||||||
# MultipartEncoder does not support list refer
|
# MultipartEncoder does not support list refer
|
||||||
# https://github.com/requests/toolbelt/issues/190 and
|
# https://github.com/requests/toolbelt/issues/190 and
|
||||||
# https://github.com/requests/toolbelt/issues/205
|
# https://github.com/requests/toolbelt/issues/205
|
||||||
|
try:
|
||||||
fields = [
|
fields = [
|
||||||
("name", queue_item["title"]),
|
("name", queue_item["title"]),
|
||||||
("licence", "1"),
|
("licence", "1"),
|
||||||
|
@ -182,6 +183,8 @@ def upload_to_pt(dl_dir, channel_conf, queue_item, access_token, thumb_extension
|
||||||
("previewfile", get_file(thumb_file)),
|
("previewfile", get_file(thumb_file)),
|
||||||
("waitTranscoding", 'false')
|
("waitTranscoding", 'false')
|
||||||
]
|
]
|
||||||
|
except:
|
||||||
|
return
|
||||||
|
|
||||||
if channel_conf["pt_tags"] != "":
|
if channel_conf["pt_tags"] != "":
|
||||||
fields.append(("tags", "[" + channel_conf["pt_tags"] + "]"))
|
fields.append(("tags", "[" + channel_conf["pt_tags"] + "]"))
|
||||||
|
|
Ładowanie…
Reference in New Issue