[banshee] [AmazonMp3] Add 'Amazon MP3s' Music smart playlist
- From: Gabriel Burt <gburt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] [AmazonMp3] Add 'Amazon MP3s' Music smart playlist
- Date: Tue, 24 Aug 2010 20:01:29 +0000 (UTC)
commit c6bfdaa0301d9c089849001e34fbbd30a5a44184
Author: Gabriel Burt <gabriel burt gmail com>
Date: Tue Aug 24 14:37:14 2010 -0500
[AmazonMp3] Add 'Amazon MP3s' Music smart playlist
.../AmazonMp3DownloaderService.cs | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/src/Extensions/Banshee.AmazonMp3/Banshee.AmazonMp3/AmazonMp3DownloaderService.cs b/src/Extensions/Banshee.AmazonMp3/Banshee.AmazonMp3/AmazonMp3DownloaderService.cs
index 81f5c21..7721532 100644
--- a/src/Extensions/Banshee.AmazonMp3/Banshee.AmazonMp3/AmazonMp3DownloaderService.cs
+++ b/src/Extensions/Banshee.AmazonMp3/Banshee.AmazonMp3/AmazonMp3DownloaderService.cs
@@ -27,9 +27,12 @@
using System;
using System.IO;
+using Mono.Unix;
+
using Hyena;
using Banshee.ServiceStack;
+using Banshee.Configuration;
namespace Banshee.AmazonMp3
{
@@ -44,6 +47,16 @@ namespace Banshee.AmazonMp3
}
return false;
});
+
+ if (DatabaseConfigurationClient.Client.Get<int> ("amazonmp3", "smart_playlist_version", 0) == 0) {
+ var sp = new Banshee.SmartPlaylist.SmartPlaylistDefinition (
+ Catalog.GetString ("Amazon MP3s"),
+ Catalog.GetString ("Songs purchased from the Amazon MP3 Store"),
+ "comment=\"amazon\"", true).ToSmartPlaylistSource (ServiceManager.SourceManager.MusicLibrary);
+ sp.Save ();
+ sp.RefreshAndReload ();
+ DatabaseConfigurationClient.Client.Set<int> ("amazonmp3", "smart_playlist_version", 1);
+ }
}
public void Dispose ()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]