public override bool InitializeComponent()
 {
     Logger.Write(this, LogLevel.Debug, "Querying CDDB for drive: {0}", this.Drive);
     try
     {
         //The CDDB and Read must be executed together so synchronize.
         lock (SyncRoot)
         {
             var id       = BassCd.GetID(this.Drive, CDID.CDDB);
             var sequence = BassCd.GetID(this.Drive, CDID.Read);
             this.Parser = new CddbTextParser(id, sequence);
         }
         if (this.Parser.Count == 0)
         {
             Logger.Write(this, LogLevel.Debug, "CDDB did not return any information for drive: {0}", this.Drive);
             return(false);
         }
     }
     catch (Exception e)
     {
         Logger.Write(this, LogLevel.Warn, "Failed to query CDDB for drive {0}: {1}", this.Drive, e.Message);
         return(false);
     }
     return(base.InitializeComponent());
 }
 public override bool InitializeComponent()
 {
     Logger.Write(this, LogLevel.Debug, "Querying CDDB for drive: {0}", this.Drive);
     this.Parser = new CddbTextParser(BassCd.GetID(this.Drive, CDID.CDDB), BassCd.GetID(this.Drive, CDID.Read));
     if (this.Parser.Count == 0)
     {
         Logger.Write(this, LogLevel.Debug, "CDDB did not return any information for drive: {0}", this.Drive);
         return(false);
     }
     return(base.InitializeComponent());
 }