moved __init__ to top of class

This commit is contained in:
Lex Berezhny 2020-02-03 22:05:23 -05:00
parent 1780ddd329
commit 6525ee6510

View file

@ -14,6 +14,12 @@ log = logging.getLogger(__name__)
class VideoFileAnalyzer: class VideoFileAnalyzer:
def __init__(self, conf: TranscodeConfig):
self._conf = conf
self._available_encoders = ""
self._ffmpeg_installed = False
self._which = None
async def _execute(self, command, arguments): async def _execute(self, command, arguments):
args = shlex.split(arguments) args = shlex.split(arguments)
process = await asyncio.create_subprocess_exec(self._conf.ffmpeg_folder + command, *args, process = await asyncio.create_subprocess_exec(self._conf.ffmpeg_folder + command, *args,
@ -42,12 +48,6 @@ class VideoFileAnalyzer:
self._ffmpeg_installed = True self._ffmpeg_installed = True
log.debug("Using %s at %s", version.splitlines()[0].split(" Copyright")[0], self._which) log.debug("Using %s at %s", version.splitlines()[0].split(" Copyright")[0], self._which)
def __init__(self, conf: TranscodeConfig):
self._conf = conf
self._available_encoders = ""
self._ffmpeg_installed = False
self._which = None
async def status(self, reset=False): async def status(self, reset=False):
if reset: if reset:
self._available_encoders = "" self._available_encoders = ""