예제 #1
0
        private void _beginConversion(VideoFile originalFile, string extension)
        {
            var originalPath = Path.Combine(_baseFolder, originalFile.Folder, $"{originalFile.FileName}.{originalFile.FileExtension}");
            var newPath      = FileMetadata.VerifyFileUniqueness(Path.Combine(_baseFolder, originalFile.Folder, $"{originalFile.FileName}.{extension}"));

            try
            {
                _mediaManager.VideoConversion(originalPath, newPath);

                var metadata = new FileMetadata(newPath);
                metadata.GetDuration(_mediaManager);

                var newVideoFile = metadata.MapToExistingVideoFileEntity(originalFile);
                _videoFileReposotroy.Update(newVideoFile);
            }
            catch
            {
                Console.Write("There Was An Error");
            }
        }