You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
81 lines
1.5 KiB
Python
81 lines
1.5 KiB
Python
#! /usr/bin/python3
|
|
|
|
import os, sys, subprocess, json, click, time, re, tempfile, math
|
|
from datetime import datetime, timedelta
|
|
|
|
from ffx.file_properties import FileProperties
|
|
|
|
from ffx.ffx_app import FfxApp
|
|
from ffx.ffx_controller import FfxController
|
|
from ffx.show_controller import ShowController
|
|
from ffx.tmdb_controller import TmdbController
|
|
|
|
from ffx.database import databaseContext
|
|
|
|
from ffx.track_descriptor import TrackDescriptor
|
|
from ffx.track_type import TrackType
|
|
from ffx.video_encoder import VideoEncoder
|
|
from ffx.track_disposition import TrackDisposition
|
|
|
|
from ffx.process import executeProcess
|
|
|
|
from ffx.test.helper import createMediaFile
|
|
|
|
from ffx.test.scenario import Scenario
|
|
|
|
VERSION='0.1.0'
|
|
|
|
# 0.1.1
|
|
# Bugfixes, TMBD identify shows
|
|
# 0.1.2
|
|
# Bugfixes
|
|
# 0.1.3
|
|
# Subtitle file imports
|
|
|
|
|
|
@click.group()
|
|
@click.pass_context
|
|
def ffx(ctx):
|
|
"""FFX"""
|
|
|
|
ctx.obj = {}
|
|
ctx.obj['database'] = databaseContext(databasePath=None)
|
|
|
|
|
|
# Define a subcommand
|
|
@ffx.command()
|
|
def version():
|
|
click.echo(VERSION)
|
|
|
|
|
|
# Another subcommand
|
|
@ffx.command()
|
|
def help():
|
|
click.echo(f"ffx tests {VERSION}\n")
|
|
click.echo(f"Usage: ffx_test ...")
|
|
|
|
|
|
# @ffx.command()
|
|
# def show():
|
|
# for i in Scenario().list():
|
|
# click.echo(i)
|
|
|
|
|
|
# Another subcommand
|
|
@ffx.command()
|
|
def run():
|
|
"""Run ffx test sequences"""
|
|
|
|
for scenarioIndex in Scenario().list():
|
|
|
|
scenario = Scenario().getClassReference(scenarioIndex)()
|
|
|
|
click.echo(f"Running scenario {scenarioIndex}")
|
|
|
|
scenario.run()
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
ffx()
|