示例#1
0
文件: Program.cs 项目: jokalee/Tuto
        public static PartsList CreateParts(List <string> tracks, MontageLog log, int title)
        {
            // chunk numbers to split after
            var breakChunkNumbers = log.Commands
                                    .Where(z => z.Action == MontageAction.CommitAndSplit)
                                    .Select(z => z.Id)
                                    .ToList();

            var chunks = Montager.Montager.CreateChunks(log, "", "");
            var isFace = new Dictionary <int, bool>
            {
                { 0, true }  // starts with 'face'
            };

            foreach (var chunk in chunks.Where(chunk => !isFace.Keys.Contains(chunk.Id)))
            {
                isFace.Add(chunk.Id, chunk.IsFaceChunk);
            }

            var parts = new PartsList(breakChunkNumbers);

            parts.MakeParts(tracks, isFace, title);

            return(parts);
        }
示例#2
0
        public static PartsList CreateParts(List<string> tracks, MontageLog log, int title)
        {
            // chunk numbers to split after
            var breakChunkNumbers = log.Commands
                .Where(z => z.Action == MontageAction.CommitAndSplit)
                .Select(z => z.Id)
                .ToList();

            var chunks = Montager.Montager.CreateChunks(log, "", "");
            var isFace = new Dictionary<int, bool>
                {
                {0, true}  // starts with 'face'
            };
            foreach (var chunk in chunks.Where(chunk => !isFace.Keys.Contains(chunk.Id)))
                isFace.Add(chunk.Id, chunk.IsFaceChunk);

            var parts = new PartsList(breakChunkNumbers);
            parts.MakeParts(tracks, isFace, title);

            return parts;
        }