static char *get_status(struct misc_meta_data *nmmd)
{
- char *basename, *ret, mtime[30] = "";
+ char *basename, *dirname, *ret, mtime[30] = "";
char *status, *flags; /* vss status info */
char *ut = uptime_str();
long offset = (nmmd->offset + 500) / 1000;
status = vss_status_tohuman(nmmd->vss_status_flags);
flags = vss_get_status_flags(nmmd->vss_status_flags);
basename = para_basename(nmmd->filename);
+ dirname = para_dirname(nmmd->filename);
gettimeofday(&now, NULL);
ret = make_message(
"%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:%s\n" "%s:%lu.%lu\n" "%s:%lu.%lu\n" "%s:%s\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,
status_item_list[SI_CURRENT_TIME],
(long unsigned)now.tv_sec,
(long unsigned)now.tv_usec,
- status_item_list[SI_ATTRIBUTES], mmd->afd.attributes_string
+ status_item_list[SI_ATTRIBUTES], mmd->afd.attributes_string,
+
+ status_item_list[SI_DIRECTORY], dirname
);
free(basename);
+ free(dirname);
free(flags);
free(status);
free(ut);
d[SI_ATTRIBUTES].y = 87;
d[SI_ATTRIBUTES].len = 100;
- d[SI_DBINFO3].prefix = "";
- d[SI_DBINFO3].postfix = "";
- d[SI_DBINFO3].fg = COLOR_YELLOW;
- d[SI_DBINFO3].bg = COLOR_BLACK;
- d[SI_DBINFO3].align = CENTER;
- d[SI_DBINFO3].x = 0;
- d[SI_DBINFO3].y = 97;
- d[SI_DBINFO3].len = 100;
+ d[SI_DIRECTORY].prefix = "dir:";
+ d[SI_DIRECTORY].postfix = "";
+ d[SI_DIRECTORY].fg = COLOR_YELLOW;
+ d[SI_DIRECTORY].bg = COLOR_BLACK;
+ d[SI_DIRECTORY].align = CENTER;
+ d[SI_DIRECTORY].x = 0;
+ d[SI_DIRECTORY].y = 97;
+ d[SI_DIRECTORY].len = 100;
}
void init_theme(int num, struct gui_theme *t)
SI_FILE_SIZE, SI_STATUS_FLAGS, SI_FORMAT,
SI_SCORE, SI_AUDIO_INFO1, SI_AUDIO_INFO2,
SI_AUDIO_INFO3, SI_AFS_MODE, SI_ATTRIBUTES,
- SI_DBINFO3, SI_DECODER_FLAGS, SI_AUDIOD_STATUS,
+ SI_DIRECTORY, SI_DECODER_FLAGS, SI_AUDIOD_STATUS,
SI_PLAY_TIME, SI_UPTIME, SI_OFFSET,
SI_LENGTH, SI_STREAM_START, SI_CURRENT_TIME,
SI_AUDIOD_UPTIME, SI_SELECTOR, NUM_STAT_ITEMS
[SI_AFS_MODE] = "afs_mode",
[SI_ATTRIBUTES] = "attributes",
- [SI_DBINFO3] = "dbinfo3",
+ [SI_DIRECTORY] = "dir",
[SI_DECODER_FLAGS] = "decoder_flags",
[SI_AUDIOD_STATUS] = "audiod_status",