From: Andre Noll Date: Thu, 1 Nov 2007 18:58:12 +0000 (+0100) Subject: Rename length status item to seconds_total and print it only once. X-Git-Tag: v0.3.0~141 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=ab0e988bdbccd590a3e7ad101ae152ead4d2bfdb;p=paraslash.git Rename length status item to seconds_total and print it only once. --- diff --git a/aft.c b/aft.c index 8ac8538f..483ab252 100644 --- a/aft.c +++ b/aft.c @@ -912,6 +912,7 @@ static int print_list_item(struct ls_data *d, struct ls_options *opts, "frequency: %dHz\n" "channels: %d\n" "duration: %s\n" + "seconds_total: %lu\n" "num_played: %d\n" "last_played: %s\n" "tag info: %s\n", @@ -928,6 +929,7 @@ static int print_list_item(struct ls_data *d, struct ls_options *opts, afhi->frequency, afhi->channels, duration_buf, + afhi->seconds_total, afsi->num_played, last_played_time, afhi->info_string diff --git a/audiod.c b/audiod.c index d2d0004a..f7e481b4 100644 --- a/audiod.c +++ b/audiod.c @@ -519,7 +519,7 @@ static int check_stat_line(char *line, __a_unused void *data) case SI_OFFSET: stat_task->offset_seconds = atoi(line + ilen + 1); break; - case SI_LENGTH: + case SI_SECONDS_TOTAL: stat_task->length_seconds = atoi(line + ilen + 1); break; case SI_STREAM_START: diff --git a/command.c b/command.c index c7283106..7302d3e4 100644 --- a/command.c +++ b/command.c @@ -115,14 +115,13 @@ static char *get_status(struct misc_meta_data *nmmd) } gettimeofday(&now, NULL); ret = make_message( - "%s:%zu\n" "%s:%s\n" "%s:%lu\n" + "%s:%zu\n" "%s:%s\n" "%s:%s\n" "%s:%s\n" "%s:%s\n" "%s:%li\n" "%s:%s\n" "%s:%s\n" "%s:%lu.%lu\n" "%s:%lu.%lu\n" "%s:%s\n" "%s\n", status_item_list[SI_FILE_SIZE], nmmd->size / 1024, status_item_list[SI_MTIME], mtime, - status_item_list[SI_LENGTH], nmmd->afd.afhi.seconds_total, status_item_list[SI_BASENAME], basename ? basename : "(none)", status_item_list[SI_STATUS], status, diff --git a/gui_theme.c b/gui_theme.c index 8b6856bf..e4f4ac86 100644 --- a/gui_theme.c +++ b/gui_theme.c @@ -263,7 +263,17 @@ static void init_theme_colorful_blackness(struct gui_theme *t) d[SI_AFS_MODE].align = CENTER; d[SI_AFS_MODE].x = 0; d[SI_AFS_MODE].y = 77; - d[SI_AFS_MODE].len = 100; + d[SI_AFS_MODE].len = 50; + + d[SI_DURATION].prefix = ""; + d[SI_DURATION].postfix = ""; + d[SI_DURATION].fg = COLOR_YELLOW; + d[SI_DURATION].bg = COLOR_BLACK; + d[SI_DURATION].align = CENTER; + d[SI_DURATION].x = 50; + d[SI_DURATION].y = 77; + d[SI_DURATION].len = 50; + d[SI_ATTRIBUTES].prefix = ""; d[SI_ATTRIBUTES].postfix = ""; diff --git a/para.h b/para.h index 2d8d9cce..9fe316ed 100644 --- a/para.h +++ b/para.h @@ -167,8 +167,9 @@ enum { SI_AUDIO_INFO3, SI_AFS_MODE, SI_ATTRIBUTES, SI_DIRECTORY, SI_DECODER_FLAGS, SI_AUDIOD_STATUS, SI_PLAY_TIME, SI_UPTIME, SI_OFFSET, - SI_LENGTH, SI_STREAM_START, SI_CURRENT_TIME, + SI_SECONDS_TOTAL, SI_STREAM_START, SI_CURRENT_TIME, SI_AUDIOD_UPTIME, SI_IMAGE_ID, SI_LYRICS_ID, + SI_DURATION, NUM_STAT_ITEMS }; diff --git a/stat.c b/stat.c index eefac72c..514ca3f3 100644 --- a/stat.c +++ b/stat.c @@ -74,13 +74,14 @@ const char *status_item_list[NUM_STAT_ITEMS] = { [SI_UPTIME] = "uptime", [SI_OFFSET] = "offset", - [SI_LENGTH] = "length", + [SI_SECONDS_TOTAL] = "seconds_total", [SI_STREAM_START] = "stream_start", [SI_CURRENT_TIME] = "current_time", [SI_AUDIOD_UPTIME] = "audiod_uptime", [SI_IMAGE_ID] = "image_id", - [SI_LYRICS_ID] = "lyrics_id" + [SI_LYRICS_ID] = "lyrics_id", + [SI_DURATION] = "duration" }; static void dump_stat_client_list(void)