public void Initialize ()
        {
            ServiceManager.Get<DBusCommandService> ().ArgumentPushed += OnCommandLineArgument;
            GLib.Timeout.Add (2500, delegate {
                foreach (var path in ApplicationContext.CommandLine.Files) {
                    OnCommandLineArgument (path, null, true);
                }
                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);
            }
        }
Exemplo n.º 2
0
        public void Initialize()
        {
            ServiceManager.Get <DBusCommandService> ().ArgumentPushed += OnCommandLineArgument;
            GLib.Timeout.Add(2500, delegate {
                foreach (var path in ApplicationContext.CommandLine.Files)
                {
                    OnCommandLineArgument(path, null, true);
                }
                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);
            }
        }