mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-11 15:03:24 -05:00
Add disc number info
This commit is contained in:
parent
1c26070a38
commit
6f4df7885b
12
src/daap.c
12
src/daap.c
@ -269,8 +269,16 @@ DAAP_BLOCK *daap_response_songlist(void) {
|
||||
g = g && daap_add_int(mlit,"asdm",current->mtime); /* modified */
|
||||
}
|
||||
|
||||
// g = g && daap_add_short(mlit,"asdc",0); /* # of discs */
|
||||
// g = g && daap_add_short(mlit,"asdn",0); /* disc number */
|
||||
if(current->total_discs) {
|
||||
/* # of discs */
|
||||
g = g && daap_add_short(mlit,"asdc",current->total_discs);
|
||||
}
|
||||
|
||||
if(current->disc) {
|
||||
/* disc number */
|
||||
g = g && daap_add_short(mlit,"asdn",current->disc);
|
||||
}
|
||||
|
||||
// g = g && daap_add_char(mlit,"asdk",0); /* song datakind? */
|
||||
// aseq - null string!
|
||||
|
||||
|
@ -477,6 +477,14 @@ int scan_gettags(char *file, MP3FILE *pmp3) {
|
||||
used=1;
|
||||
pmp3->comment = utf8_text;
|
||||
DPRINTF(ERR_DEBUG," Comment: %s\n",pmp3->comment);
|
||||
} else if(!strcmp(pid3frame->id,"TPOS")) {
|
||||
tmp=(char*)utf8_text;
|
||||
strsep(&tmp,"/");
|
||||
if(tmp) {
|
||||
pmp3->total_discs=atoi(tmp);
|
||||
}
|
||||
pmp3->disc=atoi((char*)utf8_text);
|
||||
DPRINTF(ERR_DEBUG," Disc %d of %d\n",pmp3->disc,pmp3->total_discs);
|
||||
} else if(!strcmp(pid3frame->id,"TRCK")) {
|
||||
tmp=(char*)utf8_text;
|
||||
strsep(&tmp,"/");
|
||||
|
@ -40,6 +40,9 @@ typedef struct tag_mp3file {
|
||||
int track;
|
||||
int total_tracks;
|
||||
|
||||
int disc;
|
||||
int total_discs;
|
||||
|
||||
int mtime;
|
||||
int atime;
|
||||
int ctime;
|
||||
|
Loading…
Reference in New Issue
Block a user