]> git.tue.mpg.de Git - paraslash.git/commitdiff
Rename length status item to seconds_total and print it only once.
authorAndre Noll <maan@systemlinux.org>
Thu, 1 Nov 2007 18:58:12 +0000 (19:58 +0100)
committerAndre Noll <maan@systemlinux.org>
Thu, 1 Nov 2007 18:58:12 +0000 (19:58 +0100)
aft.c
audiod.c
command.c
gui_theme.c
para.h
stat.c

diff --git a/aft.c b/aft.c
index 8ac8538f7f74c37cdff2b42a827e52af28aa651e..483ab2526e1c1c4259b871644cbab704e524b73d 100644 (file)
--- 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
index d2d0004a157f961b239cf4a89f66fcf8c86c72a2..f7e481b4c66be206785e1043eb8a59e733938069 100644 (file)
--- 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:
index c7283106d4423757c8236e5299a2e0dacc19b1d9..7302d3e48039609660538daad17b3a6590190517 100644 (file)
--- 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,
index 8b6856bf37b3e9b704f4bdd0f4846dc1bce9fd0c..e4f4ac86f0e6c21451a706c6f7054cbde235d30d 100644 (file)
@@ -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 2d8d9cce390d5cb66fa7b3bea040210ff9426bb5..9fe316ed7454ed101cf2f66f2b04109f24c463dd 100644 (file)
--- 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 eefac72c02fe343a1e0d4d19aed7f84387cb8269..514ca3f3b7f065e6d1a06e4a0528581eb6ff047b 100644 (file)
--- 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)