]> git.tue.mpg.de Git - paraslash.git/commitdiff
Introduce make_empty_status_items().
authorAndre Noll <maan@systemlinux.org>
Sun, 11 Nov 2007 19:22:18 +0000 (20:22 +0100)
committerAndre Noll <maan@systemlinux.org>
Sun, 11 Nov 2007 19:22:18 +0000 (20:22 +0100)
At the end of the stream we have to reset the status items
because audiod would start a new receiver otherwise.

afs.h
aft.c
vss.c

diff --git a/afs.h b/afs.h
index b9c7706892a9b5ef6da7d23eb1da339d1421c1fa..f15b8c559bf8b442674e42409bc0fcea8b65930a 100644 (file)
--- a/afs.h
+++ b/afs.h
@@ -108,6 +108,7 @@ struct ls_data {
        HASH_TYPE *hash;
 };
 int make_status_items(struct ls_data *d, struct para_buffer *pb);
+void make_empty_status_items(char *buf);
 
 #define VERBOSE_LS_OUTPUT_SIZE 4096
 
diff --git a/aft.c b/aft.c
index fa85e4e1f4e6b92dd61eedcfda960ada335d8e32..57df793fb8b16ec1c111e21b5928d44872c9248f 100644 (file)
--- a/aft.c
+++ b/aft.c
@@ -971,6 +971,51 @@ static int print_list_item(struct ls_data *d, struct ls_options *opts,
        return 1;
 }
 
+void make_empty_status_items(char *buf)
+{
+       sprintf(buf,
+               "%s:\n" /* path */
+               "%s:\n" /* dirname */
+               "%s:\n" /* basename */
+               "%s:\n" /* score */
+               "%s:\n" /* attributes bitnmap */
+               "%s:\n" /* attributes txt */
+               "%s:\n" /* hash */
+               "%s:\n" /* image id */
+               "%s:\n" /* image name */
+               "%s:\n" /* lyrics id */
+               "%s:\n" /* lyrics name */
+               "%s:\n" /* bitrate */
+               "%s:\n" /* format */
+               "%s:\n" /* frequency */
+               "%s:\n" /* channels */
+               "%s:\n" /* duration */
+               "%s:\n" /* seconds total */
+               "%s:\n" /* num played */
+               "%s:\n" /* last played */
+               ,
+               status_item_list[SI_PATH],
+               status_item_list[SI_DIRECTORY],
+               status_item_list[SI_BASENAME],
+               status_item_list[SI_SCORE],
+               status_item_list[SI_ATTRIBUTES_BITMAP],
+               status_item_list[SI_ATTRIBUTES_TXT],
+               status_item_list[SI_HASH],
+               status_item_list[SI_IMAGE_ID],
+               status_item_list[SI_IMAGE_NAME],
+               status_item_list[SI_LYRICS_ID],
+               status_item_list[SI_LYRICS_NAME],
+               status_item_list[SI_BITRATE],
+               status_item_list[SI_FORMAT],
+               status_item_list[SI_FREQUENCY],
+               status_item_list[SI_CHANNELS],
+               status_item_list[SI_DURATION],
+               status_item_list[SI_SECONDS_TOTAL],
+               status_item_list[SI_NUM_PLAYED],
+               status_item_list[SI_LAST_PLAYED]
+       );
+}
+
 int make_status_items(struct ls_data *d, struct para_buffer *pb)
 {
        struct ls_options opts = {
diff --git a/vss.c b/vss.c
index 0290ab7537071ba090a450c14e7c744e56f9a899..75cf0f8764e273c3286ed41224b3962f61c4dc75 100644 (file)
--- a/vss.c
+++ b/vss.c
@@ -197,6 +197,7 @@ static void vss_eof(void)
                status_item_list[SI_TAGINFO1], status_item_list[SI_TAGINFO2]);
        strncpy(mmd->afd.afhi.info_string, tmp, sizeof(mmd->afd.afhi.info_string));
        mmd->afd.afhi.info_string[sizeof(mmd->afd.afhi.info_string) - 1] = '\0';
+       make_empty_status_items(mmd->afd.verbose_ls_output);
        free(tmp);
        mmd->mtime = 0;
        mmd->size = 0;