[banshee] [Migo] Allow specifying MaxItemCount when creating feeds



commit 7924558444339a98e5b22a4650903534460c2a93
Author: Gabriel Burt <gabriel burt gmail com>
Date:   Tue Dec 14 18:34:35 2010 -0600

    [Migo] Allow specifying MaxItemCount when creating feeds

 src/Libraries/Migo/Migo.Syndication/FeedManager.cs |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/src/Libraries/Migo/Migo.Syndication/FeedManager.cs b/src/Libraries/Migo/Migo.Syndication/FeedManager.cs
index 5724331..ab857cb 100644
--- a/src/Libraries/Migo/Migo.Syndication/FeedManager.cs
+++ b/src/Libraries/Migo/Migo.Syndication/FeedManager.cs
@@ -79,15 +79,20 @@ namespace Migo.Syndication
 
         public Feed CreateFeed (string url, FeedAutoDownload autoDownload)
         {
-            return CreateFeed (url, null, autoDownload, true);
+            return CreateFeed (url, autoDownload, 0);
         }
 
-        public Feed CreateFeed (string url, string title, FeedAutoDownload autoDownload)
+        public Feed CreateFeed (string url, FeedAutoDownload autoDownload, int max_items)
         {
-            return CreateFeed (url, title, autoDownload, true);
+            return CreateFeed (url, null, autoDownload, max_items, true);
         }
 
-        public Feed CreateFeed (string url, string title, FeedAutoDownload autoDownload, bool is_subscribed)
+        public Feed CreateFeed (string url, string title, FeedAutoDownload autoDownload, int max_items)
+        {
+            return CreateFeed (url, title, autoDownload, max_items, true);
+        }
+
+        public Feed CreateFeed (string url, string title, FeedAutoDownload autoDownload, int max_items, bool is_subscribed)
         {
             Feed feed = null;
             url = url.Trim ().TrimEnd ('/');
@@ -96,6 +101,7 @@ namespace Migo.Syndication
                 feed = new Feed (url, autoDownload);
                 feed.Title = title;
                 feed.IsSubscribed = is_subscribed;
+                feed.MaxItemCount = max_items;
                 feed.Save ();
                 feed.Update ();
             }



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