mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-15 16:53:18 -05:00
[mpd] Cosmetic changes: fix indentation, use bool instead of int
This commit is contained in:
parent
a0a6b7d473
commit
360439f448
46
src/mpd.c
46
src/mpd.c
@ -148,7 +148,7 @@ static const char * const ffmpeg_mime_types[] = { "application/flv", "applicatio
|
|||||||
struct mpd_client_ctx
|
struct mpd_client_ctx
|
||||||
{
|
{
|
||||||
// True if the connection is already authenticated or does not need authentication
|
// True if the connection is already authenticated or does not need authentication
|
||||||
int authenticated;
|
bool authenticated;
|
||||||
|
|
||||||
// The events the client needs to be notified of
|
// The events the client needs to be notified of
|
||||||
short events;
|
short events;
|
||||||
@ -478,23 +478,23 @@ mpd_add_db_queue_item(struct evbuffer *evbuf, struct db_queue_item *queue_item)
|
|||||||
mpd_time(modified, sizeof(modified), queue_item->time_modified);
|
mpd_time(modified, sizeof(modified), queue_item->time_modified);
|
||||||
|
|
||||||
ret = evbuffer_add_printf(evbuf,
|
ret = evbuffer_add_printf(evbuf,
|
||||||
"file: %s\n"
|
"file: %s\n"
|
||||||
"Last-Modified: %s\n"
|
"Last-Modified: %s\n"
|
||||||
"Time: %d\n"
|
"Time: %d\n"
|
||||||
"Artist: %s\n"
|
"Artist: %s\n"
|
||||||
"AlbumArtist: %s\n"
|
"AlbumArtist: %s\n"
|
||||||
"ArtistSort: %s\n"
|
"ArtistSort: %s\n"
|
||||||
"AlbumArtistSort: %s\n"
|
"AlbumArtistSort: %s\n"
|
||||||
"Album: %s\n"
|
"Album: %s\n"
|
||||||
"Title: %s\n"
|
"Title: %s\n"
|
||||||
"Track: %d\n"
|
"Track: %d\n"
|
||||||
"Date: %d\n"
|
"Date: %d\n"
|
||||||
"Genre: %s\n"
|
"Genre: %s\n"
|
||||||
"Disc: %d\n"
|
"Disc: %d\n"
|
||||||
"Pos: %d\n"
|
"Pos: %d\n"
|
||||||
"Id: %d\n",
|
"Id: %d\n",
|
||||||
(queue_item->virtual_path + 1),
|
(queue_item->virtual_path + 1),
|
||||||
modified,
|
modified,
|
||||||
(queue_item->song_length / 1000),
|
(queue_item->song_length / 1000),
|
||||||
queue_item->artist,
|
queue_item->artist,
|
||||||
queue_item->album_artist,
|
queue_item->album_artist,
|
||||||
@ -1804,15 +1804,15 @@ mpd_command_playlistid(struct evbuffer *evbuf, int argc, char **argv, char **err
|
|||||||
while ((ret = db_queue_enum_fetch(&query_params, &queue_item)) == 0 && queue_item.id > 0)
|
while ((ret = db_queue_enum_fetch(&query_params, &queue_item)) == 0 && queue_item.id > 0)
|
||||||
{
|
{
|
||||||
ret = mpd_add_db_queue_item(evbuf, &queue_item);
|
ret = mpd_add_db_queue_item(evbuf, &queue_item);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
*errmsg = safe_asprintf("Error adding media info for file with id: %d", queue_item.file_id);
|
*errmsg = safe_asprintf("Error adding media info for file with id: %d", queue_item.file_id);
|
||||||
|
|
||||||
db_queue_enum_end(&query_params);
|
db_queue_enum_end(&query_params);
|
||||||
free(query_params.filter);
|
free(query_params.filter);
|
||||||
return ACK_ERROR_UNKNOWN;
|
return ACK_ERROR_UNKNOWN;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
db_queue_enum_end(&query_params);
|
db_queue_enum_end(&query_params);
|
||||||
free(query_params.filter);
|
free(query_params.filter);
|
||||||
@ -2476,8 +2476,8 @@ mpd_command_count(struct evbuffer *evbuf, int argc, char **argv, char **errmsg,
|
|||||||
evbuffer_add_printf(evbuf,
|
evbuffer_add_printf(evbuf,
|
||||||
"songs: %d\n"
|
"songs: %d\n"
|
||||||
"playtime: %" PRIu64 "\n",
|
"playtime: %" PRIu64 "\n",
|
||||||
fci.count,
|
fci.count,
|
||||||
(fci.length / 1000));
|
(fci.length / 1000));
|
||||||
|
|
||||||
db_query_end(&qp);
|
db_query_end(&qp);
|
||||||
free(qp.filter);
|
free(qp.filter);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user