From: Rocky B. <ro...@us...> - 2004-04-02 13:03:51
|
Update of /cvsroot/xine/xine-vcdnav/input In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11740 Modified Files: xineplug_inp_cd.c Log Message: Allow retrieving more CDDB data. Index: xineplug_inp_cd.c =================================================================== RCS file: /cvsroot/xine/xine-vcdnav/input/xineplug_inp_cd.c,v retrieving revision 1.43 retrieving revision 1.44 diff -u -r1.43 -r1.44 --- xineplug_inp_cd.c 26 Mar 2004 02:34:06 -0000 1.43 +++ xineplug_inp_cd.c 2 Apr 2004 12:51:41 -0000 1.44 @@ -1158,13 +1158,16 @@ begin with %, with information from the current CD. The expanded string is returned. Here is a list of escape sequences: - %a : The artist + %a : The artist (for the album) %A : The album information + %e : The extended track data %C : Category %I : CDDB disk ID %G : Genre %M : The current MRL %m : The CD-DA Media Catalog Number (MCN) + %n : The number of tracks on the CD + %p : The artist/performer/composer in the track %T : The track number %t : The name %Y : The year 19xx or 20xx @@ -1230,7 +1233,21 @@ if (t != NULL && t->title != NULL) add_format_str_info(t->title); } else goto not_special; + case 'p': + if (this->class->cddb.enabled) { + cddb_track_t *t=cddb_disc_get_track(this->cddb.disc, + this->cur_track-1); + if (t != NULL && t->artist != NULL) + add_format_str_info(t->artist); + } else goto not_special; break; + case 'e': + if (this->class->cddb.enabled) { + cddb_track_t *t=cddb_disc_get_track(this->cddb.disc, + this->cur_track-1); + if (t != NULL && t->ext_data != NULL) + add_format_str_info(t->ext_data); + } else goto not_special; #endif @@ -1240,6 +1257,9 @@ case 'm': add_format_str_info(this->mcn); break; + case 'n': + add_format_num_info(this->num_tracks, "%d"); + break; case 'T': add_format_num_info(this->cur_track, "%d"); break; @@ -1804,11 +1824,11 @@ class->v_config.cddb_title_format = strdup(x_conf->register_string(x_conf, "cdda.cddb_cddb_title_format", - _("Track %T: %t Artist: %a, Album %A, %C (%Y)"), + _("Track %T: %t Artist: %a, Title %t, Peformer %p, %e, Album %A, %C (%Y)"), _("format string for display banner (when CDDB info available)"), "Format used in the GUI Title. Similar to the Unix date " "command. Format specifiers that start with a percent sign. Specifiers are " - "%a, %A, %C, %G, %I %M, %m, %T, %Y and %%.", + "%a, %A, %e, %C, %G, %I %M, %m, %n, %p, %T, %Y and %%.", 0, cddb_cddb_title_format_changed_cb, (void *) class)); |