From 89a9b05b7e24566f026238aa7cdfbbe344a97e08 Mon Sep 17 00:00:00 2001 From: CoasterFreakDE Date: Tue, 21 Jun 2022 13:46:56 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A5=8FFixed=20nsfw=20bug=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/subreddit.py | 1 + video_creation/video_uploader.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/subreddit.py b/utils/subreddit.py index 053566c..497ea50 100644 --- a/utils/subreddit.py +++ b/utils/subreddit.py @@ -20,6 +20,7 @@ def get_subreddit_undone(submissions: List, subreddit): continue except AttributeError: print_substep("NSFW settings not defined. Skipping NSFW post...") + print_substep(f"Submission: {submission} is {str(submission.over_18)}") environ["nsfw"] = str(submission.over_18) return submission print("all submissions have been done going by top submission order") diff --git a/video_creation/video_uploader.py b/video_creation/video_uploader.py index 63b3df8..42e2328 100644 --- a/video_creation/video_uploader.py +++ b/video_creation/video_uploader.py @@ -87,7 +87,7 @@ async def upload_video_to_tiktok(videofile): title = os.getenv("VIDEO_TITLE") or videofile.split(".")[0] is_nsfw = os.getenv("nsfw") or "false" - if is_nsfw: + if is_nsfw == 'true': title = "#nsfw " + title tags = os.getenv("TIKTOK_TAGS") or "#AskReddit"