forked from ruangrupa/konfluks
Compare commits
No commits in common. "58024c775a4a1c6e11c5d74a2020f50b78b8e8ca" and "77b8c9e0af2c2fd8f28b9c496450b9e776fdb0f8" have entirely different histories.
58024c775a
...
77b8c9e0af
|
@ -17,7 +17,6 @@ hashtags = [
|
|||
"majelisakakbar",
|
||||
"majelisakbar",
|
||||
"warungkopi",
|
||||
"lumbungkios",
|
||||
]
|
||||
|
||||
|
||||
|
|
|
@ -119,11 +119,10 @@ def main():
|
|||
existing_posts = os.listdir(output_dir)
|
||||
|
||||
for video_metadata in videos:
|
||||
post_name = sanitize_name(video_metadata["name"]) + "-" + video_metadata["uuid"]
|
||||
post_dir = os.path.join(output_dir, post_name)
|
||||
post_dir = os.path.join(output_dir, sanitize_name(video_metadata["name"]) + "-" + video_metadata["uuid"])
|
||||
|
||||
if (
|
||||
post_name not in existing_posts
|
||||
video_metadata["uuid"] not in existing_posts
|
||||
): # if there is a video we dont already have, make it
|
||||
print(
|
||||
"New: ", video_metadata["name"], "({})".format(video_metadata["uuid"])
|
||||
|
@ -131,11 +130,11 @@ def main():
|
|||
create_post(post_dir, video_metadata, host)
|
||||
|
||||
elif (
|
||||
post_name in existing_posts
|
||||
video_metadata["uuid"] in existing_posts
|
||||
): # if we already have the video do nothing, possibly update
|
||||
update_post(post_dir, video_metadata, host)
|
||||
existing_posts.remove(
|
||||
post_name
|
||||
video_metadata["uuid"]
|
||||
) # create list of posts which have not been returned by peertube
|
||||
|
||||
for post in existing_posts:
|
||||
|
|
Loading…
Reference in New Issue