mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-26 14:13:18 -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_int(mlit,"asdm",current->mtime); /* modified */
|
||||||
}
|
}
|
||||||
|
|
||||||
// g = g && daap_add_short(mlit,"asdc",0); /* # of discs */
|
if(current->total_discs) {
|
||||||
// g = g && daap_add_short(mlit,"asdn",0); /* disc number */
|
/* # 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? */
|
// g = g && daap_add_char(mlit,"asdk",0); /* song datakind? */
|
||||||
// aseq - null string!
|
// aseq - null string!
|
||||||
|
|
||||||
|
@ -477,6 +477,14 @@ int scan_gettags(char *file, MP3FILE *pmp3) {
|
|||||||
used=1;
|
used=1;
|
||||||
pmp3->comment = utf8_text;
|
pmp3->comment = utf8_text;
|
||||||
DPRINTF(ERR_DEBUG," Comment: %s\n",pmp3->comment);
|
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")) {
|
} else if(!strcmp(pid3frame->id,"TRCK")) {
|
||||||
tmp=(char*)utf8_text;
|
tmp=(char*)utf8_text;
|
||||||
strsep(&tmp,"/");
|
strsep(&tmp,"/");
|
||||||
|
@ -40,6 +40,9 @@ typedef struct tag_mp3file {
|
|||||||
int track;
|
int track;
|
||||||
int total_tracks;
|
int total_tracks;
|
||||||
|
|
||||||
|
int disc;
|
||||||
|
int total_discs;
|
||||||
|
|
||||||
int mtime;
|
int mtime;
|
||||||
int atime;
|
int atime;
|
||||||
int ctime;
|
int ctime;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user