From f971200cee447c655e816ecbbfcca850eb8ee7af Mon Sep 17 00:00:00 2001 From: "James D. Smith" Date: Wed, 15 Sep 2021 20:37:03 -0600 Subject: File properties plugin: Add genre. Change-Id: Ib28e542c51f6e037a31e6d14763ce2abaca248b9 --- apps/lang/english.lang | 14 ++++++++++++++ apps/plugins/properties.c | 6 +++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/apps/lang/english.lang b/apps/lang/english.lang index 2aa6480aa4..fce95165f0 100644 --- a/apps/lang/english.lang +++ b/apps/lang/english.lang @@ -15968,3 +15968,17 @@ *: "Album Artist" + + id: LANG_PROPERTIES_GENRE + desc: in properties plugin + user: core + + *: "[Genre]" + + + *: "[Genre]" + + + *: "Genre" + + 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]; char str_artist[MAX_PATH]; char str_albumartist[MAX_PATH]; char str_album[MAX_PATH]; +char str_genre[MAX_PATH]; char str_duration[32]; unsigned nseconds; @@ -56,6 +57,7 @@ static const unsigned char* const props_file[] = ID2P(LANG_PROPERTIES_ALBUMARTIST), str_albumartist, ID2P(LANG_PROPERTIES_TITLE), str_title, ID2P(LANG_PROPERTIES_ALBUM), str_album, + ID2P(LANG_PROPERTIES_GENRE), str_genre, ID2P(LANG_PROPERTIES_DURATION), str_duration, }; static const unsigned char* const props_dir[] = @@ -127,7 +129,9 @@ static bool file_properties(const char* selected_file) "%s", id3.title ? id3.title : ""); rb->snprintf(str_album, sizeof str_album, "%s", id3.album ? id3.album : ""); - num_properties += 4; + rb->snprintf(str_genre, sizeof str_genre, + "%s", id3.genre_string ? id3.genre_string : ""); + num_properties += 5; if (dur > 0) { -- cgit v1.2.3