static Category() { Music = new Category("Music", new CategoryField[] { CategoryField.Title, CategoryField.Album, CategoryField.Artist, CategoryField.Genre, CategoryField.Rating, CategoryField.Length, CategoryField.Path, CategoryField.ReleaseDate, CategoryField.Size, CategoryField.DiscNumber, CategoryField.TrackNumber, CategoryField.Composer, CategoryField.BitRate, CategoryField.SampleRate, CategoryField.BPM, CategoryField.Channels, CategoryField.CopyRight, CategoryField.DateAdded, CategoryField.DateModified, CategoryField.UID, CategoryField.Thumb },1); }
public FileType(string ext,string mime, Category cat) { _fileExt = ext; _cat = cat; }
public FileAnaylzer(FileInfo file) { if (file == null) throw new ArgumentNullException("file"); _file = file; if (!file.Exists) throw new FileNotFoundException(file.FullName); FileType ftype = FileType.GetFileTypeByExt(file.Extension); if (ftype == null) { _isValid = false; return; } _cat = ftype.Category; if (_cat == null) { _isValid = false; return; } try { FileStream stream = file.OpenRead(); _hash = GetHashByStream(stream); stream.Seek(0, SeekOrigin.Begin); _print = GetPrintByStream(stream ); stream.Seek(0, SeekOrigin.Begin); _tags = GetTagByStream(stream, file.Name, ftype.Mime); _tags.Add(CategoryField.Thumb, _print); stream.Close(); } catch(Exception ex) { Util.Log.LogDebugMessage("Error @ File Anaylzer: "+ex.Message); _isValid = false; } }
public LibraryViewer() { this.Build (); _category = Category.Music; Init(); }