private void BindToDatabase ()
{
int result = ServiceManager.DbConnection.Query<int> (
"SELECT PlaylistID FROM CorePlaylists WHERE Special = 1 AND Name = ? LIMIT 1",
special_playlist_name
);
if (result != 0) {
DbId = result;
} else {
DbId = ServiceManager.DbConnection.Execute (new HyenaSqliteCommand (@"
INSERT INTO CorePlaylists (PlaylistID, Name, SortColumn, SortType, Special) VALUES (NULL, ?, -1, 0, 1)
", special_playlist_name));
}
}