Skip to content

Commit

Permalink
Merge pull request #64 from CollinHeist/hotfix-no-grep
Browse files Browse the repository at this point in the history
Fix StandardTitleCard errors for machines that don't have grep
  • Loading branch information
CollinHeist authored Apr 10, 2022
2 parents c8dc337 + f8d5c4a commit dfc1193
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions modules/StandardTitleCard.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,17 +269,17 @@ def _get_series_count_text_dimensions(self) -> dict:
f'-gravity center',
*self.__series_count_text_effects(),
f'-annotate +0+689.5 "• "',
f'-gravity west', # Episode text
f'-gravity west', # Episode text
*self.__series_count_text_effects(),
f'-annotate +1640+697.2 "{self.episode_text}"',
f'null: 2>&1 | grep Metrics'
f'null: 2>&1'
])

metrics = self.image_magick.run_get_stdout(command)

widths = list(map(int, findall('width: (\d+)', metrics)))
heights = list(map(int, findall('height: (\d+)', metrics)))

widths = list(map(int, findall('Metrics:.*width:\s+(\d+)', metrics)))
heights = list(map(int, findall('Metrics:.*height:\s+(\d+)', metrics)))
return {
'width': sum(widths),
'width1': widths[0],
Expand Down

0 comments on commit dfc1193

Please sign in to comment.