summaryrefslogtreecommitdiff
path: root/apps/plugins/properties.c
diff options
context:
space:
mode:
authorJames D. Smith <smithjd15@gmail.com>2021-09-15 20:37:03 -0600
committerJames D. Smith <smithjd15@gmail.com>2021-09-15 21:56:58 -0600
commitf971200cee447c655e816ecbbfcca850eb8ee7af (patch)
tree9b276b744b3c01087d7806ea1f0bc30685e98f57 /apps/plugins/properties.c
parent7882e093b23f186f089abb91c245787cc2e04a62 (diff)
downloadrockbox-f971200cee447c655e816ecbbfcca850eb8ee7af.tar.gz
rockbox-f971200cee447c655e816ecbbfcca850eb8ee7af.zip
File properties plugin: Add genre.
Change-Id: Ib28e542c51f6e037a31e6d14763ce2abaca248b9
Diffstat (limited to 'apps/plugins/properties.c')
-rw-r--r--apps/plugins/properties.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/plugins/properties.c b/apps/plugins/properties.c
index 5e2ab5101c..f94b3934c3 100644
--- a/apps/plugins/properties.c
+++ b/apps/plugins/properties.c
@@ -36,6 +36,7 @@ char str_title[MAX_PATH];
36char str_artist[MAX_PATH]; 36char str_artist[MAX_PATH];
37char str_albumartist[MAX_PATH]; 37char str_albumartist[MAX_PATH];
38char str_album[MAX_PATH]; 38char str_album[MAX_PATH];
39char str_genre[MAX_PATH];
39char str_duration[32]; 40char str_duration[32];
40 41
41unsigned nseconds; 42unsigned nseconds;
@@ -56,6 +57,7 @@ static const unsigned char* const props_file[] =
56 ID2P(LANG_PROPERTIES_ALBUMARTIST), str_albumartist, 57 ID2P(LANG_PROPERTIES_ALBUMARTIST), str_albumartist,
57 ID2P(LANG_PROPERTIES_TITLE), str_title, 58 ID2P(LANG_PROPERTIES_TITLE), str_title,
58 ID2P(LANG_PROPERTIES_ALBUM), str_album, 59 ID2P(LANG_PROPERTIES_ALBUM), str_album,
60 ID2P(LANG_PROPERTIES_GENRE), str_genre,
59 ID2P(LANG_PROPERTIES_DURATION), str_duration, 61 ID2P(LANG_PROPERTIES_DURATION), str_duration,
60}; 62};
61static const unsigned char* const props_dir[] = 63static const unsigned char* const props_dir[] =
@@ -127,7 +129,9 @@ static bool file_properties(const char* selected_file)
127 "%s", id3.title ? id3.title : ""); 129 "%s", id3.title ? id3.title : "");
128 rb->snprintf(str_album, sizeof str_album, 130 rb->snprintf(str_album, sizeof str_album,
129 "%s", id3.album ? id3.album : ""); 131 "%s", id3.album ? id3.album : "");
130 num_properties += 4; 132 rb->snprintf(str_genre, sizeof str_genre,
133 "%s", id3.genre_string ? id3.genre_string : "");
134 num_properties += 5;
131 135
132 if (dur > 0) 136 if (dur > 0)
133 { 137 {