Beispiel #1
0
        private void OnExited(NonInteractiveProcessState processState, int exitCode, ReleaseMedium releaseMedium, Playlist playlist, List <Track> selectedTracks, string outputMKVPath)
        {
            LogExit(processState, exitCode);

            _tempFileRegistrar.DeleteTempFiles(_progressFilePath, _inputFileListPath);

            if (processState != NonInteractiveProcessState.Completed)
            {
                return;
            }

            var coverArt = releaseMedium != null?releaseMedium.CoverArtImages.FirstOrDefault(image => image.IsSelected) : null;

            var coverArtImage = coverArt != null ? coverArt.Image : null;
            var mkvPropEdit   = new MkvPropEdit(_jobObjectManager, _tempFileRegistrar)
            {
                SourceFilePath = outputMKVPath
            }
            .RemoveAllTags()
            .AddCoverArt(coverArtImage)
            .SetChapters(playlist.Chapters)
//                .SetDefaultTracksAuto(selectedTracks) // Breaks MediaInfo
            ;

            mkvPropEdit.Start();
        }
Beispiel #2
0
        string GetMkvPropEditVersion(IJobObjectManager jobObjectManager)
        {
            string result      = "";
            var    mkvpropedit = new MkvPropEdit(jobObjectManager, null);

            mkvpropedit.Arguments = new ProcessUtils.ArgumentList("--version");
            mkvpropedit.StdOut   += delegate(string line) { result += line; };
            mkvpropedit.Start(); // sync
            return(result);
        }
Beispiel #3
0
        private void OnExited(NonInteractiveProcessState processState, int exitCode, ReleaseMedium releaseMedium, Playlist playlist, string outputMKVPath)
        {
            LogExit(processState, exitCode);

            DeleteTempFilesAsync();

            if (processState != NonInteractiveProcessState.Completed)
            {
                return;
            }

            var mkvPropEdit = new MkvPropEdit(_jobObjectManager, _tempFileRegistrar)
            {
                SourceFilePath = outputMKVPath
            }
            .RemoveAllTags()
            .AddCoverArt(releaseMedium)
            .SetChapters(playlist.Chapters)
//                .SetDefaultTracksAuto(selectedTracks) // Breaks MediaInfo
            ;

            mkvPropEdit.Start();
        }
Beispiel #4
0
        private void OnExited(NonInteractiveProcessState processState, int exitCode, ReleaseMedium releaseMedium, Playlist playlist, List<Track> selectedTracks, string outputMKVPath)
        {
            LogExit(processState, exitCode);

            _tempFileRegistrar.DeleteTempFiles(_progressFilePath, _inputFileListPath);

            if (processState != NonInteractiveProcessState.Completed)
                return;

            var coverArt = releaseMedium != null ? releaseMedium.CoverArtImages.FirstOrDefault(image => image.IsSelected) : null;
            var coverArtImage = coverArt != null ? coverArt.Image : null;
            var mkvPropEdit = new MkvPropEdit(_jobObjectManager, _tempFileRegistrar) { SourceFilePath = outputMKVPath }
                .RemoveAllTags()
                .AddCoverArt(coverArtImage)
                .SetChapters(playlist.Chapters)
            //                .SetDefaultTracksAuto(selectedTracks) // Breaks MediaInfo
            ;
            mkvPropEdit.Start();
        }