diff options
author | James D. Smith <smithjd15@gmail.com> | 2021-09-15 20:51:22 -0600 |
---|---|---|
committer | James D. Smith <smithjd15@gmail.com> | 2021-09-15 21:57:13 -0600 |
commit | 3acbab15a183f712d8ed3b3a073c92dbf42c17fd (patch) | |
tree | fa2e54f57317b02d72ec8b847465820fbb5fc826 /apps/plugins/properties.c | |
parent | f3874bda6404de75e431e7fa5004960a17be2c96 (diff) | |
download | rockbox-3acbab15a183f712d8ed3b3a073c92dbf42c17fd.tar.gz rockbox-3acbab15a183f712d8ed3b3a073c92dbf42c17fd.zip |
File properties plugin: Add composer.
Change-Id: I7123ad21af15483594b9d247b89f7712c3a1a6f0
Diffstat (limited to 'apps/plugins/properties.c')
-rw-r--r-- | apps/plugins/properties.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/plugins/properties.c b/apps/plugins/properties.c index bc892a4464..07a953c432 100644 --- a/apps/plugins/properties.c +++ b/apps/plugins/properties.c | |||
@@ -33,6 +33,7 @@ char str_date[64]; | |||
33 | char str_time[64]; | 33 | char str_time[64]; |
34 | 34 | ||
35 | char str_title[MAX_PATH]; | 35 | char str_title[MAX_PATH]; |
36 | char str_composer[MAX_PATH]; | ||
36 | char str_artist[MAX_PATH]; | 37 | char str_artist[MAX_PATH]; |
37 | char str_albumartist[MAX_PATH]; | 38 | char str_albumartist[MAX_PATH]; |
38 | char str_album[MAX_PATH]; | 39 | char str_album[MAX_PATH]; |
@@ -54,6 +55,7 @@ static const unsigned char* const props_file[] = | |||
54 | ID2P(LANG_PROPERTIES_SIZE), str_size, | 55 | ID2P(LANG_PROPERTIES_SIZE), str_size, |
55 | ID2P(LANG_PROPERTIES_DATE), str_date, | 56 | ID2P(LANG_PROPERTIES_DATE), str_date, |
56 | ID2P(LANG_PROPERTIES_TIME), str_time, | 57 | ID2P(LANG_PROPERTIES_TIME), str_time, |
58 | ID2P(LANG_PROPERTIES_COMPOSER), str_composer, | ||
57 | ID2P(LANG_PROPERTIES_ARTIST), str_artist, | 59 | ID2P(LANG_PROPERTIES_ARTIST), str_artist, |
58 | ID2P(LANG_PROPERTIES_ALBUMARTIST), str_albumartist, | 60 | ID2P(LANG_PROPERTIES_ALBUMARTIST), str_albumartist, |
59 | ID2P(LANG_PROPERTIES_TITLE), str_title, | 61 | ID2P(LANG_PROPERTIES_TITLE), str_title, |
@@ -123,6 +125,8 @@ static bool file_properties(const char* selected_file) | |||
123 | rb->get_metadata(&id3, fd, selected_file)) | 125 | rb->get_metadata(&id3, fd, selected_file)) |
124 | { | 126 | { |
125 | long dur = id3.length / 1000; /* seconds */ | 127 | long dur = id3.length / 1000; /* seconds */ |
128 | rb->snprintf(str_composer, sizeof str_composer, | ||
129 | "%s", id3.composer ? id3.composer : ""); | ||
126 | rb->snprintf(str_artist, sizeof str_artist, | 130 | rb->snprintf(str_artist, sizeof str_artist, |
127 | "%s", id3.artist ? id3.artist : ""); | 131 | "%s", id3.artist ? id3.artist : ""); |
128 | rb->snprintf(str_albumartist, sizeof str_albumartist, | 132 | rb->snprintf(str_albumartist, sizeof str_albumartist, |
@@ -135,7 +139,7 @@ static bool file_properties(const char* selected_file) | |||
135 | "%s", id3.genre_string ? id3.genre_string : ""); | 139 | "%s", id3.genre_string ? id3.genre_string : ""); |
136 | rb->snprintf(str_comment, sizeof str_comment, | 140 | rb->snprintf(str_comment, sizeof str_comment, |
137 | "%s", id3.comment ? id3.comment : ""); | 141 | "%s", id3.comment ? id3.comment : ""); |
138 | num_properties += 6; | 142 | num_properties += 7; |
139 | 143 | ||
140 | if (dur > 0) | 144 | if (dur > 0) |
141 | { | 145 | { |