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