Exemple #1
0
 void writeEntry(StreamWriter wrt, CueSheetEntry e, int i)
 {
     indent = "  ";
     wrtl_track(wrt, i + 1);
     indent = "    ";
     wrtl(wrt, "title", e.title());
     wrtl(wrt, "performer", e.performer());
     wrtl(wrt, "piece", e.getPiece(), true);
     wrtl(wrt, "composer", e.getComposer(), true);
     wrtl_index(wrt, 1, e.offset());
 }
 void writeEntry(StreamWriter wrt,CueSheetEntry e,int i)
 {
     indent="  ";
     wrtl_track(wrt,i+1);
     indent="    ";
     wrtl (wrt,"title",e.title ());
     wrtl (wrt,"performer",e.performer ());
     wrtl (wrt,"piece",e.getPiece (),true);
     wrtl (wrt,"composer",e.getComposer (),true);
     wrtl_index(wrt,1,e.offset ());
 }
Exemple #3
0
        public override void Reload()
        {
            _filteredList.Clear();
            List <CueSheet> s = MySource.getSheets();
            int             i, N;
            string          artist = "";

            if (_artist != null)
            {
                artist = Loosely.prepare(_artist.Name);
            }
            string composer = "";

            if (_composer != null)
            {
                composer = Loosely.prepare(_composer.Name);
            }
            for (i = 0, N = s.Count; i < N; i++)
            {
                bool do_add = true;
                if (_genre != null)
                {
                    if (s[i].genre() != _genre.Genre)
                    {
                        do_add = false;
                    }
                }
                if (_artist != null && do_add)
                {
                    if (!Loosely.eqp(artist, s[i].performer()))
                    {
                        do_add = false;
                    }
                }
                if (_composer != null && do_add)
                {
                    if (!Loosely.eqp(composer, s[i].composer()))
                    {
                        do_add = false;
                    }
                }
                if (_album_search != null && do_add)
                {
                    if (!s[i].title().ToLower().Contains(_album_search) &&
                        !s[i].performer().ToLower().Contains(_album_search) &&
                        !s[i].composer().ToLower().Contains(_album_search))
                    {
                        if (_also_in_tracks)
                        {
                            CueSheet q = s[i];
                            int      k, M;
                            bool     can_add = false;
                            for (k = 0, M = q.nEntries(); k < M && !can_add; k++)
                            {
                                CueSheetEntry e = q.entry(k);
                                if (e.title().ToLower().Contains(_album_search) ||
                                    e.performer().ToLower().Contains(_album_search) ||
                                    e.getComposer().ToLower().Contains(_album_search))
                                {
                                    can_add = true;
                                }
                            }
                            do_add = can_add;
                        }
                        else
                        {
                            do_add = false;
                        }
                    }
                }

                if (do_add)
                {
                    _filteredList.Add(new CS_AlbumInfo(s[i]));
                }
            }
            _filteredList.Sort(new CS_AlbumInfo.Comparer());
            base.RaiseReloaded();
        }