X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/39c53343f7874d57ba1c79e6c99f52c54ea74a7f..fde67de26e36cf02d5632d934623bbc054a3c1d9:/lib/client.c diff --git a/lib/client.c b/lib/client.c index 5c4cac5..a0502eb 100644 --- a/lib/client.c +++ b/lib/client.c @@ -2,20 +2,18 @@ * This file is part of DisOrder. * Copyright (C) 2004-2008 Richard Kettlewell * - * This program is free software; you can redistribute it and/or modify + * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA + * along with this program. If not, see . */ /** @file lib/client.c * @brief Simple C client @@ -453,7 +451,7 @@ int disorder_connect(disorder_client *c) { if(!password) { /* Oh well */ c->last = "no password"; - error(0, "no password configured"); + error(0, "no password configured for user '%s'", username); return -1; } return disorder_connect_generic(config, @@ -1361,6 +1359,15 @@ int disorder_schedule_add(disorder_client *c, return rc; } +/** @brief Adopt a track + * @param c Client + * @param id Track ID to adopt + * @return 0 on success, non-0 on error + */ +int disorder_adopt(disorder_client *c, const char *id) { + return disorder_simple(c, 0, "adopt", id, (char *)0); +} + /** @brief Delete a playlist * @param c Client * @param playlist Playlist to delete