kopia lustrzana https://codeberg.org/mister_monster/YouTube2Peertube
add channel name in error file
rodzic
a6469621b7
commit
7af4e6221b
|
@ -239,9 +239,9 @@ def pt_http_import(dl_dir, channel_conf, queue_item, access_token, thumb_extensi
|
||||||
return handle_peertube_result(requests.post(pt_api + "/videos/imports", data=multipart_data, headers=headers))
|
return handle_peertube_result(requests.post(pt_api + "/videos/imports", data=multipart_data, headers=headers))
|
||||||
|
|
||||||
|
|
||||||
def log_upload_error(yt_url):
|
def log_upload_error(yt_url,channel_conf):
|
||||||
error_file = open("video_errors.txt", "a")
|
error_file = open("video_errors.csv", "a")
|
||||||
error_file.write(yt_url+"\n")
|
error_file.write(channel_conf['name']+","+yt_url+"\n")
|
||||||
error_file.close()
|
error_file.close()
|
||||||
print("error !")
|
print("error !")
|
||||||
|
|
||||||
|
@ -301,7 +301,7 @@ def run_steps(conf):
|
||||||
if pt_result:
|
if pt_result:
|
||||||
print("done !")
|
print("done !")
|
||||||
else:
|
else:
|
||||||
log_upload_error(queue_item["link"])
|
log_upload_error(queue_item["link"],channel_conf)
|
||||||
if delete_videos:
|
if delete_videos:
|
||||||
print("deleting videos and/or thumbnails...")
|
print("deleting videos and/or thumbnails...")
|
||||||
rmtree(dl_dir + "/" + channel_conf["name"], ignore_errors=True)
|
rmtree(dl_dir + "/" + channel_conf["name"], ignore_errors=True)
|
||||||
|
|
Ładowanie…
Reference in New Issue