private BansheeLibraryAnalyzer () { ml = ServiceManager.SourceManager.MusicLibrary; scan_synch = new object (); pca_synch = new object (); update_synch = new object (); db_synch = new object (); db = new NoNoiseDBHandler (); GetPcaData (); analyzing_lib = false; added_while_scanning = false; updating_db = false; lib_scanned = CheckLibScanned (); data_up_to_date = CheckDataUpToDate (); Hyena.Log.Debug ("NoNoise/BLA - adding library change handler"); ml.TracksAdded += HandleTracksAdded; ml.TracksDeleted += HandleTracksDeleted; }
public CustomView() { Hyena.Log.Debug("NoNoise - CustomView constructor"); session = new Session(API_KEY, API_SECRET); db = new NoNoiseDBHandler (); if (dotests) PerformTests (); // PCA if (dopca) PcaForMusicLibrary (); // TrackInfo in NoNoise DB if (saveTrackInfosToDB) WriteTrackInfosToDB (); // BPM detector detector = BpmDetectJob.GetDetector (); if (detector != null) { detector.FileFinished += OnFileFinished; Hyena.Log.Debug("NoNoise - Detector is not null"); } // using Active Source Source source = ServiceManager.SourceManager.ActiveSource; ITrackModelSource track_source = source as ITrackModelSource; if (track_source != null) { Hyena.Log.Debug("NoNoise - TS name: " + track_source.Name); Hyena.Log.Debug("NoNoise - TS count: " + track_source.Count); Hyena.Log.Debug("NoNoise - TS generic name: " + track_source.GenericName); } // using MusicLibrary if (doprintlib) PrintMusicLibrary(); // selection test if (doprintselection) PrintSelection (); // button handler button.Pressed += ButtonPushHandler; button.Label = "get artist info"; bw.Add(button); w.Add(emptylabel); w.Add(bw); w.ShowAll(); }