How to use the pysd.Tv_show_tools function in pysd

To help you get started, we’ve selected a few pysd examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github KonishchevDmitry / pysd / pysd.py View on Github external
try:
            signal.signal(signal.SIGINT,  self.__signal_handler)
            signal.siginterrupt(signal.SIGINT, False)

            signal.signal(signal.SIGQUIT, self.__signal_handler)
            signal.siginterrupt(signal.SIGQUIT, False)

            signal.signal(signal.SIGTERM, self.__signal_handler)
            signal.siginterrupt(signal.SIGTERM, False)

            signal.siginterrupt(signal.SIGPIPE, False)


            locale.setlocale(locale.LC_ALL, "")
            languages, use_opensubtitles, paths, recursive = self.__get_cmd_options()
            tools = Tv_show_tools(use_opensubtitles)

            errors = tools.get_subtitles(paths, languages, recursive)
        except (End_work_exception, Fatal_error) as e:
            E(e)
        except BaseException as e:
            if not isinstance(e, SystemExit):
                E("pysd crashed: {0}.", e)
        else:
            sys.exit(1 if errors else 0)

        sys.exit(1)