Example #1
0
 public void Dispose()
 {
     if (watcher != null) {
         watcher.Dispose ();
         watcher = null;
     }
 }
Example #2
0
        public LsongsPlugin()
        {
            dbpath = Path.Combine (Environment.GetEnvironmentVariable ("HOME"), "Documents/Music/Lsongs/LsongsMusicLibrary.xml");
            lsongsDir = Path.GetDirectoryName (dbpath);

            if (Directory.Exists (lsongsDir)) {
                Init ();
            } else {
                watcher = new CreationWatcher (lsongsDir);
                watcher.Created += delegate {
                    watcher.Dispose ();
                    watcher = null;
                    Init ();
                };
            }
        }
Example #3
0
        public void Dispose()
        {
            lock (commitLock) {
                lastChange = DateTime.MaxValue;
                Monitor.Pulse (commitLock);
            }

            if (watcher != null) {
                watcher.Dispose ();
                watcher = null;
            }

            if (conn != null) {
                conn.Close ();
                conn = null;
            }
        }
Example #4
0
        public RhythmboxPlugin()
        {
            dbpath = Path.Combine (Environment.GetEnvironmentVariable ("HOME"), ".gnome2/rhythmbox/rhythmdb.xml");
            plpath = Path.Combine (Environment.GetEnvironmentVariable ("HOME"), ".gnome2/rhythmbox/playlists.xml");
            rhythmboxDir = Path.GetDirectoryName (dbpath);

            if (Directory.Exists (rhythmboxDir)) {
                Init ();
            } else {
                watcher = new CreationWatcher (rhythmboxDir);
                watcher.Created += delegate {
                    watcher.Dispose ();
                    watcher = null;
                    Init ();
                };
            }
        }
Example #5
0
        public BansheePlugin()
        {
            tracks = new Dictionary<int, Track> ();
            playlists = new Dictionary<int, Playlist> ();

            dbpath = Path.Combine (Environment.GetEnvironmentVariable ("HOME"),
                                   ".gnome2/banshee/banshee.db");
            bansheeDir = Path.GetDirectoryName (dbpath);

            if (Directory.Exists (bansheeDir)) {
                Init ();
            } else {
                watcher = new CreationWatcher (bansheeDir);
                watcher.Created += delegate {
                    watcher.Dispose ();
                    watcher = null;
                    Init ();
                };
            }
        }
Example #6
0
        public AmarokPlugin()
        {
            tracks = new Dictionary<string, Track> ();
            playlists = new Dictionary<string, Playlist> ();

            dbpath = Path.Combine (Environment.GetEnvironmentVariable ("HOME"),
                                   ".kde/share/apps/amarok/collection.db");
            pldir = Path.Combine (Environment.GetEnvironmentVariable ("HOME"),
                                  ".kde/share/apps/amarok/playlists");

            amarokDir = Path.GetDirectoryName (dbpath);

            if (Directory.Exists (amarokDir)) {
                Init ();
            } else {
                watcher = new CreationWatcher (amarokDir);
                watcher.Created += delegate {
                    watcher.Dispose ();
                    watcher = null;
                    Init ();
                };
            }
        }