public CS_ArtistModel(CueSheetsSource s)
 {
     MySource    = s;
     _nullArtist = new CS_ArtistInfo(null);
     _artists    = new List <CS_ArtistInfo>();
     Selection   = new Hyena.Collections.Selection();
 }
        public override void Reload()
        {
            HashSet <string> added = new HashSet <String>();

            _artists.Clear();
            List <CueSheet> s = MySource.getSheets();

            _artists.Add(_nullArtist);
            string composer = "";

            if (_composer != null)
            {
                composer = Loosely.prepare(_composer.Name);
            }
            for (int i = 0; i < s.Count; i++)
            {
                string perf = Loosely.prepare(s[i].performer());
                if (!added.Contains(perf))
                {
                    bool do_add = true;
                    if (_genre != null)
                    {
                        if (s[i].genre() != _genre.Genre)
                        {
                            do_add = false;
                        }
                    }
                    if (_composer != null)
                    {
                        if (!Loosely.eqp(composer, s[i].composer()))
                        {
                            do_add = false;
                        }
                    }
                    if (do_add)
                    {
                        CS_ArtistInfo a = new CS_ArtistInfo(s[i]);
                        _artists.Add(a);
                        added.Add(perf);
                    }
                }
            }
            _artists.Sort(new CS_ArtistInfo.Comparer());
            base.RaiseReloaded();
        }
        public bool isNullArtist(ArtistInfo a)
        {
            CS_ArtistInfo aa = (CS_ArtistInfo)a;

            return(aa.getCueSheet() == null);
        }