]> git.tue.mpg.de Git - paraslash.git/commitdiff
Replace status item DBINFO2 by ATTRIBUTES.
authorAndre Noll <maan@systemlinux.org>
Tue, 23 Oct 2007 20:06:51 +0000 (22:06 +0200)
committerAndre Noll <maan@systemlinux.org>
Tue, 23 Oct 2007 20:06:51 +0000 (22:06 +0200)
afs.h
aft.c
command.c
gui_theme.c
para.h
stat.c

diff --git a/afs.h b/afs.h
index 4d3feb4840ec21f4d315c0a2fce9926377e6d9e9..a4624ba2b9d0a8a5a994e52695c14ecb9fd2f8f8 100644 (file)
--- a/afs.h
+++ b/afs.h
@@ -72,6 +72,7 @@ enum play_mode {PLAY_MODE_MOOD, PLAY_MODE_PLAYLIST};
 
 struct audio_file_data {
        enum play_mode current_play_mode;
+       char attributes_string[MAXLINE];
        int fd;
        long score;
        struct afs_info afsi;
diff --git a/aft.c b/aft.c
index 99b972c9d19a6dfb729bdd0ed56b09f73762ac59..f81c48569d23a83c6e863f7b23e1d72e7f137926 100644 (file)
--- a/aft.c
+++ b/aft.c
@@ -666,6 +666,7 @@ int open_and_update_audio_file(struct osl_row *aft_row, struct audio_file_data *
        int ret = get_hash_of_row(aft_row, &aft_hash);
        struct afsi_change_event_data aced;
        struct osl_object map, chunk_table_obj;
+       char *tmp;
 
        if (ret < 0)
                return ret;
@@ -704,7 +705,12 @@ int open_and_update_audio_file(struct osl_row *aft_row, struct audio_file_data *
        ret = load_chunk_info(&chunk_table_obj, &afd->afhi);
        if (ret < 0)
                goto err;
-
+       ret = get_attribute_text(&afd->afsi.attributes, " ", &tmp);
+       if (ret < 0)
+               goto err;
+       tmp[sizeof(afd->attributes_string) - 1] = '\0';
+       strcpy(afd->attributes_string, tmp); /* OK */
+       free(tmp);
        aced.aft_row = aft_row;
        aced.old_afsi = &afd->afsi;
        afs_event(AFSI_CHANGE, NULL, &aced);
index 977e45673086fc517237fa2099e7803c61f94149..74141b9e3b5dc14d4a2ab70ed9138f2645e4debe 100644 (file)
--- a/command.c
+++ b/command.c
@@ -115,7 +115,7 @@ static char *get_status(struct misc_meta_data *nmmd)
                "%s:%zu\n"      "%s:%s\n"               "%s:%lu\n"      "%s:%u\n"
                "%s:%s\n"       "%s:%s\n"       "%s:%s\n"       "%s:%s\n"
                "%s:%li\n"      "%s:%s\n"       "%s:%s\n" "%s"
-               "%s:%s\n"       "%s:%lu.%lu\n"  "%s:%lu.%lu\n",
+               "%s:%s\n"       "%s:%lu.%lu\n"  "%s:%lu.%lu\n" "%s:%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,
@@ -137,7 +137,8 @@ static char *get_status(struct misc_meta_data *nmmd)
                        (long unsigned)nmmd->stream_start.tv_usec,
                status_item_list[SI_CURRENT_TIME],
                        (long unsigned)now.tv_sec,
-                       (long unsigned)now.tv_usec
+                       (long unsigned)now.tv_usec,
+               status_item_list[SI_ATTRIBUTES], mmd->afd.attributes_string
 
        );
        free(bar);
index 98830c22a667f3fa0075a4e8cc3fc5de6a1c6150..483b21fe5d4f43bbf49c43900a558ab443dc20f1 100644 (file)
@@ -256,14 +256,14 @@ static void init_theme_colorful_blackness(struct gui_theme *t)
        d[SI_AFS_MODE].y = 77;
        d[SI_AFS_MODE].len = 100;
 
-       d[SI_DBINFO2].prefix = "";
-       d[SI_DBINFO2].postfix = "";
-       d[SI_DBINFO2].fg = COLOR_YELLOW;
-       d[SI_DBINFO2].bg = COLOR_BLACK;
-       d[SI_DBINFO2].align = CENTER;
-       d[SI_DBINFO2].x = 0;
-       d[SI_DBINFO2].y = 87;
-       d[SI_DBINFO2].len = 100;
+       d[SI_ATTRIBUTES].prefix = "";
+       d[SI_ATTRIBUTES].postfix = "";
+       d[SI_ATTRIBUTES].fg = COLOR_YELLOW;
+       d[SI_ATTRIBUTES].bg = COLOR_BLACK;
+       d[SI_ATTRIBUTES].align = CENTER;
+       d[SI_ATTRIBUTES].x = 0;
+       d[SI_ATTRIBUTES].y = 87;
+       d[SI_ATTRIBUTES].len = 100;
 
        d[SI_DBINFO3].prefix = "";
        d[SI_DBINFO3].postfix = "";
diff --git a/para.h b/para.h
index a23c44063b95e3c981a7fa77cbef55b382855eab..c41ed9dd7c756d6dee17638fa33b19382d3349b1 100644 (file)
--- a/para.h
+++ b/para.h
@@ -164,7 +164,7 @@ enum {
        SI_MTIME,               SI_LENGTH_MIN,          SI_LENGTH_SEC,
        SI_FILE_SIZE,           SI_STATUS_FLAGS,        SI_FORMAT,
        SI_SCORE,               SI_AUDIO_INFO1,         SI_AUDIO_INFO2,
-       SI_AUDIO_INFO3,         SI_AFS_MODE,            SI_DBINFO2,
+       SI_AUDIO_INFO3,         SI_AFS_MODE,            SI_ATTRIBUTES,
        SI_DBINFO3,             SI_DECODER_FLAGS,       SI_AUDIOD_STATUS,
        SI_PLAY_TIME,           SI_UPTIME,              SI_OFFSET,
        SI_LENGTH,              SI_STREAM_START,        SI_CURRENT_TIME,
diff --git a/stat.c b/stat.c
index adff3b706ddbed2d1bf4dac6c46e41df5459e8a0..93607df710cf389f0a8c9e3a03517a0df00bfc70 100644 (file)
--- a/stat.c
+++ b/stat.c
@@ -66,7 +66,7 @@ const char *status_item_list[NUM_STAT_ITEMS] = {
 
        [SI_AUDIO_INFO3] = "audio_file_info3",
        [SI_AFS_MODE] = "afs_mode",
-       [SI_DBINFO2] = "dbinfo2",
+       [SI_ATTRIBUTES] = "attributes",
 
        [SI_DBINFO3] = "dbinfo3",
        [SI_DECODER_FLAGS] = "decoder_flags",