Skip to content

Commit

Permalink
fix: cli async main (#18)
Browse files Browse the repository at this point in the history
release: v1.2.1
  • Loading branch information
Tohrusky authored Jan 2, 2025
1 parent 6fd101a commit c64e91f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ license = "GPL-3.0-only"
name = "yuisub"
readme = "README.md"
repository = "https://github.com/TensoRaws/yuisub"
version = "1.2.0"
version = "1.2.1"

# Requirements
[tool.poetry.dependencies]
Expand Down
8 changes: 6 additions & 2 deletions yuisub/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
args = parser.parse_args()


async def main() -> None:
async def _main() -> None:
if args.AUDIO and args.SUB:
raise ValueError("Please provide only one input file, either audio or subtitle file")

Expand Down Expand Up @@ -55,5 +55,9 @@ async def main() -> None:
sub_bilingual.save(args.OUTPUT_BILINGUAL)


def main() -> None:
asyncio.run(_main())


if __name__ == "__main__":
asyncio.run(main())
main()

0 comments on commit c64e91f

Please sign in to comment.