Example #1
0
        public void Init(
            string previewPath,
            string subtitlesPath,
            IViewForMediaWebSocket view,
            ICastService castService,
            CancellationToken cancellationToken,
            int?port = null)
        {
            try
            {
                if (port.HasValue)
                {
                    _logger.LogInformation($"{nameof(Init)}: Port = {port} was provided, it will be used to start this web server...");
                }
                port ??= WebServerUtils.GetOpenPort();
                _logger.LogInformation($"{nameof(Init)}: Starting web server on url = {WebServerUtils.GetWebServerIpAddress(port.Value)}...");

                _castItController = new CastItController(_loggerFactory.CreateLogger <CastItController>(), _fileService, castService, _ffmpegService, _player, _appSettings);
                _webServer        = BuildServer(previewPath, subtitlesPath, view, port.Value);
                _webServer.Start(cancellationToken);

                _logger.LogInformation($"{nameof(Init)}: Server was successfully started");
            }
            catch (Exception e)
            {
                _logger.LogError(e, $"{nameof(Init)}: Unknown error");
                _telemetryService.TrackError(e);
                throw;
            }
        }
 public CastController(ICastService castService,
                       IMapper mapper, IWebHostEnvironment env)
 {
     _castService = castService;
     _mapper      = mapper;
     _env         = env;
 }
Example #3
0
 public MoviesController(IMovieService movieService, ICastService castService, IGenreService genreService, IHttpContextAccessor httpContextAccessor, IUserService userService)
 {
     _movieService        = movieService;
     _castService         = castService;
     _genreService        = genreService;
     _httpContextAccessor = httpContextAccessor;
     _userService         = userService;
 }
Example #4
0
 public MoviesController(IMovieService movieService, ICastService castService, IGenreService genreService)
 {
     // 1.Constructir injection***** inject the implemenation into the
     //constructor of the class
     //_movieService = new MovieService();
     _movieService = movieService;
     _castService  = castService;
     _genreService = genreService;
 }
Example #5
0
 public MainService(
     ILogger <MainService> logger,
     IAppWebServer webServer,
     ICastService castService,
     IAppSettingsService appSettings,
     IFileService fileService,
     int startingPort)
 {
     _logger       = logger;
     _webServer    = webServer;
     _startingPort = startingPort;
     _fileService  = fileService;
     _appSettings  = appSettings;
     _castService  = castService;
 }
Example #6
0
 public CastItController(
     ILogger <CastItController> logger,
     IFileService fileService,
     ICastService castService,
     IFFmpegService ffmpegService,
     IPlayer player,
     IAppSettingsService appSettings)
 {
     _logger        = logger;
     _fileService   = fileService;
     _castService   = castService;
     _ffmpegService = ffmpegService;
     _player        = player;
     _appSettings   = appSettings;
 }
 public MovieController(IMovieService movieService,
                        IDirectorService directorService,
                        ICastService castService,
                        IScenaristService scenaristService,
                        IGenreService genreService,
                        ILanguageService languageService,
                        IWebHostEnvironment env,
                        UserManager <User> userManager)
 {
     _movieService     = movieService;
     _directorService  = directorService;
     _castService      = castService;
     _scenaristService = scenaristService;
     _langugageService = languageService;
     _genreService     = genreService;
     _env         = env;
     _userManager = userManager;
 }
 public RetrieveCast(ICastService castService)
 {
     _castService = castService;
 }
Example #9
0
 public void Init(string previewPath, string subtitlesPath, ICastService castService, CancellationToken cancellationToken, int?port = null)
 => Init(previewPath, subtitlesPath, null, castService, cancellationToken, port);
Example #10
0
 public CastController(ICastService castService)
 {
     _castService = castService;
 }
Example #11
0
 public CastController()
 {
     _castService = new CastService();
 }
Example #12
0
 public FilmsController(IFilmService filmService, IGenreService genreService, ICastService castService)
 {
     this.filmService  = filmService;
     this.genreService = genreService;
     this.castService  = castService;
 }
Example #13
0
 public CastsController(ICastService castService, IFilmService filmService, ITvSerieService tvSerieService)
 {
     this.castService    = castService;
     this.filmService    = filmService;
     this.tvSerieService = tvSerieService;
 }
Example #14
0
 public CastController(ICastService service)
 {
     _service = service;
 }
Example #15
0
 public CastController(ICastService castService, IMapper mapper)
 {
     _castService = castService;
     _mapper      = mapper;
 }
Example #16
0
 public CastsController(IMovieService movieService, ICastService castService)
 {
     _movieService = movieService;
     _castService  = castService;
 }
Example #17
0
 public MoviesController(ICastService castService, IMovieService movieService)
 {
     _castService  = castService;
     _movieService = movieService;
 }