unsigned short duration_width;
/** size of the num played field. */
unsigned short num_played_width;
+ /** size of the amp field. */
+ unsigned short amp_width;
};
/** Data passed from the ls command handler to its callback function. */
ret = para_printf(b,
"%s" /* score */
"%s " /* attributes */
+ "%*u " /* amp */
"%*d " /* image_id */
"%*d " /* lyrics_id */
"%*d " /* bitrate */
"%s\n", /* path */
score_buf,
att_buf,
+ w->amp_width, afsi->amp,
w->image_id_width, afsi->image_id,
w->lyrics_id_width, afsi->lyrics_id,
w->bitrate_width, afhi->bitrate,
"%s: %lu\n" /* seconds total */
"%s: %s\n" /* last played time */
"%s: %d\n" /* num_played */
+ "%s: %u\n" /* ampplification */
"%s" /* tag info */
"%s: %lu\n" /* chunk time */
"%s: %lu\n", /* num chunks */
status_item_list[SI_SECONDS_TOTAL], afhi->seconds_total,
status_item_list[SI_LAST_PLAYED], last_played_time,
status_item_list[SI_NUM_PLAYED], afsi->num_played,
+ status_item_list[SI_AMPLIFICATION], afsi->amp,
afhi->info_string,
status_item_list[SI_CHUNK_TIME], tv2ms(&afhi->chunk_tv),
status_item_list[SI_NUM_CHUNKS], afhi->chunks_total
/* get the number of chars to print this amount of time */
tmp = get_duration_width(d->afhi.seconds_total);
w->duration_width = PARA_MAX(w->duration_width, tmp);
+ GET_NUM_DIGITS(d->afsi.amp, &num_digits);
+ w->amp_width = PARA_MAX(w->amp_width, num_digits);
if (options->flags & LS_FLAG_ADMISSIBLE_ONLY) {
GET_NUM_DIGITS(score, &num_digits);
num_digits++; /* add one for the sign (space or "-") */