Skip to content

console

Console module, contains the console entry point and different subcommands.

console_entry_point() ยค

Entry point for the console. With profile flag, it runs the code with cProfile.

Source code in spotdl/console/entry_point.py
40
41
42
43
44
45
46
47
48
49
50
51
52
53
def console_entry_point():
    """
    Entry point for the console. With profile flag, it runs the code with cProfile.
    """

    if "--profile" in sys.argv:
        with cProfile.Profile() as profile:
            entry_point()

        stats = pstats.Stats(profile)
        stats.sort_stats(pstats.SortKey.TIME)
        stats.dump_stats("spotdl.profile")
    else:
        entry_point()