Пример #1
0
        protected virtual IEnumerable <IFilterListModel> CreateFiltersFor(DatabaseSource src)
        {
            if (!HasArtistAlbum)
            {
                yield break;
            }

            DatabaseAlbumArtistListModel      albumartist_model = new DatabaseAlbumArtistListModel(src, src.DatabaseTrackModel, ServiceManager.DbConnection, src.UniqueId);
            DatabaseArtistListModel           artist_model      = new DatabaseArtistListModel(src, src.DatabaseTrackModel, ServiceManager.DbConnection, src.UniqueId);
            DatabaseAlbumListModel            album_model       = new DatabaseAlbumListModel(src, src.DatabaseTrackModel, ServiceManager.DbConnection, src.UniqueId);
            DatabaseQueryFilterModel <string> genre_model       = new DatabaseQueryFilterModel <string> (src, src.DatabaseTrackModel, ServiceManager.DbConnection,
                                                                                                         Catalog.GetString("All Genres ({0})"), src.UniqueId, BansheeQuery.GenreField, "Genre");
            DatabaseYearListModel year_model = new DatabaseYearListModel(src, src.DatabaseTrackModel, ServiceManager.DbConnection, src.UniqueId);

            if (this == src)
            {
                this.artist_model = artist_model;
                this.album_model  = album_model;
                this.genre_model  = genre_model;
            }

            yield return(genre_model);

            yield return(albumartist_model);

            yield return(artist_model);

            yield return(year_model);

            yield return(album_model);
        }
Пример #2
0
        protected override IEnumerable <IFilterListModel> CreateFiltersFor(DatabaseSource src)
        {
            DatabaseQueryFilterModel <string> genre_model = new DatabaseQueryFilterModel <string> (src, src.DatabaseTrackModel, ServiceManager.DbConnection,
                                                                                                   Catalog.GetString("All Genres ({0})"), src.UniqueId, Banshee.Query.BansheeQuery.GenreField, "Genre");

            if (this == src)
            {
                this.genre_model = genre_model;
            }

            yield return(genre_model);
        }
Пример #3
0
        protected override IEnumerable<IFilterListModel> CreateFiltersFor (DatabaseSource src)
        {
            DatabaseQueryFilterModel<string> genre_model = new DatabaseQueryFilterModel<string> (src, src.DatabaseTrackModel, ServiceManager.DbConnection,
                        Catalog.GetString ("All Genres ({0})"), src.UniqueId, Banshee.Query.BansheeQuery.GenreField, "Genre");

            if (this == src) {
                this.genre_model = genre_model;
            }

            yield return genre_model;
        }
Пример #4
0
        protected virtual IEnumerable<IFilterListModel> CreateFiltersFor (DatabaseSource src)
        {
            if (!HasArtistAlbum) {
                yield break;
            }

            DatabaseArtistListModel artist_model = new DatabaseArtistListModel (src, src.DatabaseTrackModel, ServiceManager.DbConnection, src.UniqueId);
            DatabaseAlbumListModel album_model = new DatabaseAlbumListModel (src, src.DatabaseTrackModel, ServiceManager.DbConnection, src.UniqueId);
            DatabaseQueryFilterModel<string> genre_model = new DatabaseQueryFilterModel<string> (src, src.DatabaseTrackModel, ServiceManager.DbConnection,
                        Catalog.GetString ("All Genres ({0})"), src.UniqueId, BansheeQuery.GenreField, "Genre");

            if (this == src) {
                this.artist_model = artist_model;
                this.album_model = album_model;
                this.genre_model = genre_model;
            }

            yield return artist_model;
            yield return album_model;
            yield return genre_model;
        }