示例#1
0
文件: Movie.cs 项目: kenhwong/xdata
 public Movie()
 {
     this.UID = Guid.NewGuid();
     if (M_VideoFiles?.Count > 0)
     {
         M_Duration = M_VideoFiles.Sum(vf => vf.VF_Duration);
         M_FileSize = M_VideoFiles.Sum(vf => vf.VF_FileSize);
         M_MIME     = M_VideoFiles.First().VF_VideoMIME;
     }
 }
示例#2
0
文件: Movie.cs 项目: kenhwong/xdata
        public Movie(FileInfo sourceFI) : this()
        {
            M_SourcePath = sourceFI.DirectoryName;
            MediaFile f = new MediaFile(sourceFI.FullName);

            if (f.HasStreams)
            {
                GetVideoFilesFromSource(sourceFI.Extension);
                M_MIME     = f.General.InternetMediaType;
                M_FileSize = M_VideoFiles.Sum <VideoFile>(vf => vf.VF_FileSize);
                M_Duration = M_VideoFiles.Sum <VideoFile>(vf => vf.VF_Duration);
            }
            f.General.Dispose();
        }