banshee r4034 - in trunk/banshee: . src/Core/Banshee.Services/Banshee.Collection src/Core/Banshee.Services/Banshee.Collection.Database src/Core/Banshee.Services/Banshee.Sources



Author: gburt
Date: Fri May 30 03:52:09 2008
New Revision: 4034
URL: http://svn.gnome.org/viewvc/banshee?rev=4034&view=rev

Log:
2008-05-29  Gabriel Burt  <gabriel burt gmail com>

	* src/Core/Banshee.Services/Banshee.Sources/DatabaseSource.cs:
	* src/Core/Banshee.Services/Banshee.Sources/Source.cs:
	* src/Core/Banshee.Services/Banshee.Collection/AlbumListModel.cs:
	* src/Core/Banshee.Services/Banshee.Collection/TrackListModel.cs:
	* src/Core/Banshee.Services/Banshee.Collection/BansheeListModel.cs:
	* src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackListModel.cs:
	Remove a bunch of crufty code and replace a bunch of NIEXs with Log.Error.


Modified:
   trunk/banshee/ChangeLog
   trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackListModel.cs
   trunk/banshee/src/Core/Banshee.Services/Banshee.Collection/AlbumListModel.cs
   trunk/banshee/src/Core/Banshee.Services/Banshee.Collection/BansheeListModel.cs
   trunk/banshee/src/Core/Banshee.Services/Banshee.Collection/TrackListModel.cs
   trunk/banshee/src/Core/Banshee.Services/Banshee.Sources/DatabaseSource.cs
   trunk/banshee/src/Core/Banshee.Services/Banshee.Sources/Source.cs

Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackListModel.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackListModel.cs	(original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackListModel.cs	Fri May 30 03:52:09 2008
@@ -185,12 +185,6 @@
             }
         }
 
-        /*public void UpdateAggregates ()
-        {
-            UpdateUnfilteredAggregates ();
-            UpdateFilteredAggregates ();
-        }*/
-
         private void UpdateUnfilteredAggregates ()
         {
             HyenaSqliteCommand count_command = new HyenaSqliteCommand (String.Format (
@@ -199,12 +193,6 @@
             count = connection.Query<long> (count_command);
         }
 
-        /*private void UpdateFilteredAggregates ()
-        {
-            cache.UpdateAggregates ();
-            filtered_count = cache.Count;
-        }*/
-        
         public override void Reload ()
         {
             Reload (null);
@@ -423,63 +411,6 @@
                 : String.Format (" {0} {1} ", prefix, condition);
         }
 
-        /*public override IEnumerable<ArtistInfo> ArtistInfoFilter {
-            set {
-                ModelHelper.BuildIdFilter<ArtistInfo> (value, "CoreTracks.ArtistID", artist_id_filter_query,
-                    delegate (ArtistInfo artist) {
-                        if (!(artist is DatabaseArtistInfo)) {
-                            return null;
-                        }
-                        
-                        return ((DatabaseArtistInfo)artist).DbId.ToString ();
-                    },
-                
-                    delegate (string new_filter) {
-                        artist_id_filter_query = new_filter;
-                        Console.WriteLine ("artist filter now set to {0}", artist_id_filter_query);
-                    }
-                );
-            }
-        }
-        
-        public override IEnumerable<AlbumInfo> AlbumInfoFilter {
-            set { 
-                ModelHelper.BuildIdFilter<AlbumInfo> (value, "CoreTracks.AlbumID", album_id_filter_query,
-                    delegate (AlbumInfo album) {
-                        if (!(album is DatabaseAlbumInfo)) {
-                            return null;
-                        }
-                        
-                        return ((DatabaseAlbumInfo)album).DbId.ToString ();
-                    },
-                
-                    delegate (string new_filter) {
-                        album_id_filter_query = new_filter;
-                        Console.WriteLine ("album filter now set to {0}", album_id_filter_query);
-                    }
-                );
-            }
-        }*/
-
-        public override void ClearArtistAlbumFilters ()
-        {
-            Reload ();
-        }
-
-        /*private HyenaSqliteCommand check_artists_command = new HyenaSqliteCommand (
-            "SELECT ItemID FROM CoreCache WHERE ModelID = ? AND ItemID NOT IN (SELECT ArtistID FROM CoreArtists)"
-        );
-
-        private HyenaSqliteCommand check_albums_command = new HyenaSqliteCommand (
-            "SELECT ItemID FROM CoreCache WHERE ModelID = ? AND ItemID NOT IN (SELECT AlbumID FROM CoreAlbums)"
-        );*/
-
-        /*public void CheckFilters ()
-        {
-            if (track_model.Artist
-            if (ServiceManager.DbConnection.Query<int> (
-        }*/
-
         public int CacheId {
             get { return (int) cache.CacheId; }
         }

Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.Collection/AlbumListModel.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.Collection/AlbumListModel.cs	(original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.Collection/AlbumListModel.cs	Fri May 30 03:52:09 2008
@@ -51,9 +51,5 @@
         public override void Clear ()
         {
         }
-
-        public virtual IEnumerable<ArtistInfo> ArtistInfoFilter {
-            set { throw new NotImplementedException(); }
-        }
     }
 }

Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.Collection/BansheeListModel.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.Collection/BansheeListModel.cs	(original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.Collection/BansheeListModel.cs	Fri May 30 03:52:09 2008
@@ -76,22 +76,12 @@
         }
         
         public abstract void Clear();
-        /*{
-            throw new NotImplementedException();
-        }*/
         
         public abstract void Reload();
-        /*{
-            throw new NotImplementedException();
-        }*/
     
         public abstract T this[int index] { get; }
-            /*get { throw new NotImplementedException(); }
-        }*/
 
         public abstract int Count { get; }
-            /*get { throw new NotImplementedException(); }
-        }*/
 
         public virtual Selection Selection {
             get { return selection; }

Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.Collection/TrackListModel.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.Collection/TrackListModel.cs	(original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.Collection/TrackListModel.cs	Fri May 30 03:52:09 2008
@@ -49,23 +49,8 @@
             selection = new Selection ();
         }
         
-        public virtual int IndexOf(TrackInfo track)
-        {
-            throw new NotImplementedException();
-        }
+        public abstract int IndexOf (TrackInfo track);
 
         public abstract TrackInfo GetRandom (DateTime notPlayedSince, bool repeat);
-        
-        public virtual IEnumerable<ArtistInfo> ArtistInfoFilter {
-            set { throw new NotImplementedException(); }
-        }
-        
-        public virtual IEnumerable<AlbumInfo> AlbumInfoFilter {
-            set { throw new NotImplementedException(); }
-        }
-
-        public virtual void ClearArtistAlbumFilters ()
-        {
-        }
     }
 }

Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.Sources/DatabaseSource.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.Sources/DatabaseSource.cs	(original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.Sources/DatabaseSource.cs	Fri May 30 03:52:09 2008
@@ -469,23 +469,22 @@
 
         protected virtual void RemoveTrackRange (DatabaseTrackListModel model, RangeCollection.Range range)
         {
-            throw new NotImplementedException(); 
+            Log.ErrorFormat ("RemoveTrackRange not implemented by {0}", this);
         }
 
-
         protected virtual void DeleteTrackRange (DatabaseTrackListModel model, RangeCollection.Range range)
         {
-            throw new NotImplementedException(); 
+            Log.ErrorFormat ("DeleteTrackRange not implemented by {0}", this);
         }
 
         protected virtual void AddTrackRange (DatabaseTrackListModel model, RangeCollection.Range range)
         {
-            throw new NotImplementedException(); 
+            Log.ErrorFormat ("AddTrackRange not implemented by {0}", this);
         }
         
         protected virtual void AddTrack (DatabaseTrackInfo track)
         {
-            throw new NotImplementedException(); 
+            Log.ErrorFormat ("AddTrack not implemented by {0}", this);
         }
 
         protected virtual void RateTrackRange (DatabaseTrackListModel model, RangeCollection.Range range, int rating)

Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.Sources/Source.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.Sources/Source.cs	(original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.Sources/Source.cs	Fri May 30 03:52:09 2008
@@ -151,7 +151,7 @@
         
         public virtual void MergeSourceInput (Source source, SourceMergeType mergeType)
         {
-            throw new NotImplementedException ();
+            Log.ErrorFormat ("MergeSourceInput not implemented by {0}", this);
         }
         
         public virtual SourceMergeType SupportedMergeTypes {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]