瀏覽代碼

fix Response 400 error on use_pt_http_import=true (#20)

pull/21/head
Jakob GitHub 3 年之前
父節點
當前提交
a68e0800e5
沒有發現已知的金鑰在資料庫的簽署中 GPG Key ID: 4AEE18F83AFDEB23
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. +2
    -1
      youtube2peertube.py

+ 2
- 1
youtube2peertube.py 查看文件

@@ -164,6 +164,7 @@ def upload_to_pt(dl_dir, channel_conf, queue_item, access_token, thumb_extension
thumb_file = dl_dir + channel_conf["name"] + "/" + queue_item["yt_videoid"] + "." + thumb_extension
description = channel_conf["description_prefix"] + "\n\n" + queue_item["summary"] + "\n\n" + channel_conf["description_suffix"]
channel_id = str(get_pt_channel_id(channel_conf))
category = utils.set_pt_category(channel_conf["pt_channel_category"])
# We need to transform fields into tuple to deal with tags as
# MultipartEncoder does not support list refer
# https://github.com/requests/toolbelt/issues/190 and
@@ -176,7 +177,7 @@ def upload_to_pt(dl_dir, channel_conf, queue_item, access_token, thumb_extension
("nsfw", channel_conf["nsfw"]),
("channelId", channel_id),
("originallyPublishedAt", queue_item["published"]),
("category", channel_conf["pt_channel_category"]),
("category", category),
("language", channel_conf["default_lang"]),
("privacy", str(channel_conf["pt_privacy"])),
("commentsEnabled", channel_conf["comments_enabled"]),


Loading…
取消
儲存