Wait a minute after uploading a video to give Mastodon time to process it
This commit is contained in:
parent
83c87c310d
commit
d69dbd7194
1 changed files with 2 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
||||||
"""Main script to toot a new post"""
|
"""Main script to toot a new post"""
|
||||||
|
|
||||||
|
import time
|
||||||
from os import getenv, remove
|
from os import getenv, remove
|
||||||
from os.path import getsize
|
from os.path import getsize
|
||||||
|
|
||||||
|
@ -71,6 +72,7 @@ for submission in reddit.subreddit(str(getenv("REDDIT_SUBREDDIT"))).top(time_fil
|
||||||
mastodon.status_post(status_text, visibility="unlisted")
|
mastodon.status_post(status_text, visibility="unlisted")
|
||||||
else:
|
else:
|
||||||
media = mastodon.media_post(filename)
|
media = mastodon.media_post(filename)
|
||||||
|
time.sleep(60.0)
|
||||||
status_text = submission.title + "\n\ngeposted von u/" + submission.author.name + "\nhttps://www.reddit.com" + submission.permalink
|
status_text = submission.title + "\n\ngeposted von u/" + submission.author.name + "\nhttps://www.reddit.com" + submission.permalink
|
||||||
mastodon.status_post(status_text, media_ids=media["id"], visibility="unlisted")
|
mastodon.status_post(status_text, media_ids=media["id"], visibility="unlisted")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue