[banshee] [Podcasts] Only reload the source after all items are added
- From: Bertrand Lorentz <blorentz src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [banshee] [Podcasts] Only reload the source after all items are added
- Date: Thu, 7 Jan 2010 17:15:40 +0000 (UTC)
commit 09800525256e3465c9b456ae67801a43670f971c
Author: Bertrand Lorentz <bertrand lorentz gmail com>
Date: Sun Jan 3 15:30:19 2010 +0100
[Podcasts] Only reload the source after all items are added
For large feeds, reloading the source for each podcast items leads to
massive CPU usage and longer execution times. It doesn't bring any
benefit, as the user doesn't see the new items anyway, because of the
CPU load.
.../Banshee.Podcasting/PodcastService.cs | 3 ++-
src/Libraries/Migo/Migo.Syndication/Feed.cs | 1 +
2 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/Extensions/Banshee.Podcasting/Banshee.Podcasting/PodcastService.cs b/src/Extensions/Banshee.Podcasting/Banshee.Podcasting/PodcastService.cs
index 808875d..01b3cbc 100644
--- a/src/Extensions/Banshee.Podcasting/Banshee.Podcasting/PodcastService.cs
+++ b/src/Extensions/Banshee.Podcasting/Banshee.Podcasting/PodcastService.cs
@@ -388,7 +388,7 @@ namespace Banshee.Podcasting
track.ExternalId = item.DbId;
track.PrimarySource = source;
(track.ExternalObject as PodcastTrackInfo).SyncWithFeedItem ();
- track.Save (true);
+ track.Save (false);
RefreshArtworkFor (item.Feed);
} else {
// We're only interested in items that have enclosures
@@ -425,6 +425,7 @@ namespace Banshee.Podcasting
private void OnFeedsChanged (object o, EventArgs args)
{
source.Reload ();
+ source.NotifyTracksChanged ();
}
/*private void OnFeedAddedHandler (object sender, FeedEventArgs args)
diff --git a/src/Libraries/Migo/Migo.Syndication/Feed.cs b/src/Libraries/Migo/Migo.Syndication/Feed.cs
index 9b93636..9a6924e 100644
--- a/src/Libraries/Migo/Migo.Syndication/Feed.cs
+++ b/src/Libraries/Migo/Migo.Syndication/Feed.cs
@@ -397,6 +397,7 @@ namespace Migo.Syndication
}
if (added_any) {
+ Manager.OnFeedsChanged ();
CheckForItemsToDownload ();
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]