From 9ac2ea1d5783ed6d40afb5256e5e2f90ca2cf47b Mon Sep 17 00:00:00 2001 From: QC Date: Sat, 11 Oct 2014 13:23:07 +0200 Subject: [PATCH] Add rating field to mpd_Song --- src/libmpdclient.c | 2 ++ src/libmpdclient.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/libmpdclient.c b/src/libmpdclient.c index c4617e6..404fe2b 100644 --- a/src/libmpdclient.c +++ b/src/libmpdclient.c @@ -1024,6 +1024,7 @@ mpd_Song * mpd_newSong(void) { ret->pos = MPD_SONG_NO_NUM; ret->id = MPD_SONG_NO_ID; ret->priority = MPD_SONG_NO_PRIORITY;; + ret->rating = MPD_SONG_NO_RATING; return ret; } @@ -1052,6 +1053,7 @@ mpd_Song * mpd_songDup(const mpd_Song * song) { ret->pos = song->pos; ret->id = song->id; ret->priority = song->priority; + ret->rating = song->rating; return ret; } diff --git a/src/libmpdclient.h b/src/libmpdclient.h index 5dea74a..f329b2c 100644 --- a/src/libmpdclient.h +++ b/src/libmpdclient.h @@ -260,6 +260,7 @@ void mpd_freeSearchStats(mpd_SearchStats * stats); #define MPD_SONG_NO_TIME -1 #define MPD_SONG_NO_NUM -1 #define MPD_SONG_NO_ID -1 +#define MPD_SONG_NO_RATING -1 #define MPD_SONG_NO_PRIORITY 0 /* mpd_Song @@ -305,6 +306,8 @@ typedef struct _mpd_Song { int id; /* Priority */ int priority; + /* rating */ + int rating; } mpd_Song; /* mpd_newSong -- 2.11.4.GIT