[Banshee-List] Part Shuffle Plugin



Hello,

I started to make another plug-in for banshee : Party Shuffle.
Target Functions are the same as the party shuffle function in iTunes.

I hope noone already started with this plug-in. ;-)

But a couple of questions about the playlists :

Can I add a playlist with this code? ( works visually, but maybe some er)
                partyList = new PlaylistSource();
                partyList.Rename("Party Shuffle");
                partyList.Commit();
                SourceManager.AddSource(partyList);

Can I delete a playlist with this code?
            partyList.Delete();

Can I detect that a playlist excist (the name) with this code? (Doesn't want to work) IDataReader reader = Globals.Library.Db.Query("SELECT PlaylistID FROM Playlists");
            while(reader.Read()) {
PlaylistSource playlist = new PlaylistSource (Convert.ToInt32(reader[0]));
                if (playlist.Name.Equals("Party Shuffle"))
                        partyList = playlist;
            }
            reader.Dispose();

Thanks,
Thijs Vermeir




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]