fixed formatting changes

pull/1092/head
Supreme-hub 2 years ago
parent ca97087ac8
commit 5d0172a463

@ -60,9 +60,9 @@ class TTSEngine:
self.call_tts("title", process_text(self.reddit_object["thread_title"])) self.call_tts("title", process_text(self.reddit_object["thread_title"]))
processed_text = process_text(self.reddit_object["thread_post"]) processed_text = process_text(self.reddit_object["thread_post"])
if ( if (
processed_text != "" processed_text != ""
and settings.config["settings"]["storymode"] == True and settings.config["settings"]["storymode"] == True
): ):
self.call_tts("posttext", processed_text) self.call_tts("posttext", processed_text)
idx = None idx = None
@ -122,7 +122,7 @@ class TTSEngine:
def call_tts(self, filename: str, text: str): def call_tts(self, filename: str, text: str):
self.tts_module.run( self.tts_module.run(
text, filepath=f"{self.path}/{filename}.mp3" text, filepath=f"{self.path}/{filename}.mp3"
) )
# try: # try:
# self.length += MP3(f"{self.path}/{filename}.mp3").info.length # self.length += MP3(f"{self.path}/{filename}.mp3").info.length
# except (MutagenError, HeaderNotFoundError): # except (MutagenError, HeaderNotFoundError):

@ -55,7 +55,7 @@ def get_subreddit_threads(POST_ID: str):
sub = settings.config["reddit"]["thread"]["subreddit"] sub = settings.config["reddit"]["thread"]["subreddit"]
print_substep(f"Using subreddit: r/{sub} from TOML config") print_substep(f"Using subreddit: r/{sub} from TOML config")
subreddit_choice = sub subreddit_choice = sub
if (str(subreddit_choice).casefold().startswith("r/")): # removes the r/ from the input if str(subreddit_choice).casefold().startswith("r/"): # removes the r/ from the input
subreddit_choice = subreddit_choice[2:] subreddit_choice = subreddit_choice[2:]
subreddit = reddit.subreddit( subreddit = reddit.subreddit(
subreddit_choice subreddit_choice

@ -117,4 +117,5 @@ def handle_input(
return user_input return user_input
console.print( console.print(
"[red bold]" + err_message + "\nValid options are: " + ", ".join(map(str, options)) + "." "[red bold]" + err_message + "\nValid options are: " + ", ".join(map(str, options)) + "."
) )

@ -55,7 +55,7 @@ def get_subreddit_undone(submissions: list, subreddit, times_checked=0):
return get_subreddit_undone( return get_subreddit_undone(
subreddit.top( subreddit.top(
time_filter=VALID_TIME_FILTERS[index],limit=(50 if int(index) == 0 else index + 1 * 50), time_filter=VALID_TIME_FILTERS[index],limit=(50 if int(index) == 0 else index + 1 * 50)
), ),
subreddit, subreddit,
times_checked=index, times_checked=index,

@ -35,7 +35,7 @@ class Video:
return ImageClip(path) return ImageClip(path)
def add_watermark( def add_watermark(
self, text, opacity=0.5, duration: int | float = 5, position: Tuple = (0.7, 0.9), fontsize=15, self, text, opacity=0.5, duration: int | float = 5, position: Tuple = (0.7, 0.9), fontsize=15
): ):
compensation = round( compensation = round(
(position[0] / ((len(text) * (fontsize / 5) / 1.5) / 100 + position[0] * position[0])), (position[0] / ((len(text) * (fontsize / 5) / 1.5) / 100 + position[0] * position[0])),

@ -85,7 +85,7 @@ def make_final_video(
image_clips = [] image_clips = []
# Gather all images # Gather all images
new_opacity = 1 if opacity is None or float(opacity) >= 1 else float(opacity) new_opacity = 1 if opacity is None or float(opacity) >= 1 else float(opacity)
new_transition = (0 if transition is None or float(transition) > 2 else float(transition)) new_transition = 0 if transition is None or float(transition) > 2 else float(transition)
image_clips.insert( image_clips.insert(
0, 0,
ImageClip("assets/temp/png/title.png") ImageClip("assets/temp/png/title.png")

Loading…
Cancel
Save