Add support for daap.songuserplaycount

It's used to give proper replies to Remote when it asks for unplayed
Podcasts. Maps to play_count in the database, which already existed
(very good forward thinking by the original authors).
This commit is contained in:
ejurgensen 2013-10-21 22:54:45 +02:00
parent c935f8cc3b
commit 74c7e6ceda
2 changed files with 3 additions and 0 deletions

View File

@ -35,6 +35,7 @@ struct dmap_query_field_map;
"daap.songtime", "f.song_length", 1
"daap.songtrackcount", "f.total_tracks", 1
"daap.songtracknumber", "f.track", 1
"daap.songuserplaycount", "f.play_count", 1
"daap.songyear", "f.year", 1
"com.apple.itunes.mediakind", "f.media_kind", 1
"com.apple.itunes.extended-media-kind", "f.media_kind", 1

View File

@ -79,6 +79,7 @@ static const struct dmap_field_map dfm_dmap_aseq = { -1,
static const struct dmap_field_map dfm_dmap_asfm = { dbmfi_offsetof(type), -1, -1 };
static const struct dmap_field_map dfm_dmap_asgn = { dbmfi_offsetof(genre), -1, -1 };
static const struct dmap_field_map dfm_dmap_asdt = { dbmfi_offsetof(description), -1, -1 };
static const struct dmap_field_map dfm_dmap_aspc = { dbmfi_offsetof(play_count), -1, -1 };
static const struct dmap_field_map dfm_dmap_asrv = { -1, -1, -1 };
static const struct dmap_field_map dfm_dmap_assr = { dbmfi_offsetof(samplerate), -1, -1 };
static const struct dmap_field_map dfm_dmap_assz = { dbmfi_offsetof(file_size), -1, -1 };
@ -198,6 +199,7 @@ struct dmap_field;
"daap.songgenre", "asgn", &dfm_dmap_asgn, DMAP_TYPE_STRING
"daap.songkeywords", "asky", &dfm_dmap_asky, DMAP_TYPE_STRING
"daap.songlongcontentdescription", "aslc", &dfm_dmap_aslc, DMAP_TYPE_STRING
"daap.songuserplaycount", "aspc", &dfm_dmap_aspc, DMAP_TYPE_UINT
"daap.songrelativevolume", "asrv", &dfm_dmap_asrv, DMAP_TYPE_BYTE
"daap.sortartist", "assa", &dfm_dmap_assa, DMAP_TYPE_STRING
"daap.sortcomposer", "assc", &dfm_dmap_assc, DMAP_TYPE_STRING