Banshee.CoverArt.CoverArtJob.Start C# (CSharp) Method

Start() public method

public Start ( ) : void
return void
        public void Start ()
        {
            Register ();
        }

Usage Example

Beispiel #1
0
        public void FetchCoverArt(bool force)
        {
            if (job == null && ServiceManager.Get <Network> ().Connected)
            {
                DateTime last_scan = DateTime.MinValue;

                if (!force)
                {
                    try {
                        last_scan = DatabaseConfigurationClient.Client.Get <DateTime> ("last_cover_art_scan",
                                                                                       DateTime.MinValue);
                    } catch (FormatException) {
                        Log.Warning("last_cover_art_scan is malformed, resetting to default value");
                        DatabaseConfigurationClient.Client.Set <DateTime> ("last_cover_art_scan",
                                                                           DateTime.MinValue);
                    }
                }
                job           = new CoverArtJob(last_scan);
                job.Finished += delegate {
                    if (!job.IsCancelRequested)
                    {
                        DatabaseConfigurationClient.Client.Set <DateTime> ("last_cover_art_scan", DateTime.Now);
                    }
                    job = null;
                };
                job.Start();
            }
        }
All Usage Examples Of Banshee.CoverArt.CoverArtJob::Start