From 7035e2e2b9c9899d67b90adbe061347e18124f10 Mon Sep 17 00:00:00 2001 From: "James D. Smith" Date: Wed, 15 Sep 2021 21:06:37 -0600 Subject: File properties plugin: Add year. Change-Id: I160507a67354c775ca9695c7e71303fe16beb6db --- apps/lang/english.lang | 14 ++++++++++++++ apps/plugins/properties.c | 6 +++++- 2 files changed, 19 insertions(+), 1 deletion(-) (limited to 'apps') diff --git a/apps/lang/english.lang b/apps/lang/english.lang index 0f5bf23e9a..66ca47b176 100644 --- a/apps/lang/english.lang +++ b/apps/lang/english.lang @@ -16010,3 +16010,17 @@ *: "Composer" + + id: LANG_PROPERTIES_YEAR + desc: in properties plugin + user: core + + *: "[Year]" + + + *: "[Year]" + + + *: "Year" + + diff --git a/apps/plugins/properties.c b/apps/plugins/properties.c index 07a953c432..620c08a332 100644 --- a/apps/plugins/properties.c +++ b/apps/plugins/properties.c @@ -39,6 +39,7 @@ char str_albumartist[MAX_PATH]; char str_album[MAX_PATH]; char str_genre[MAX_PATH]; char str_comment[MAX_PATH]; +char str_year[MAX_PATH]; char str_duration[32]; unsigned nseconds; @@ -62,6 +63,7 @@ static const unsigned char* const props_file[] = ID2P(LANG_PROPERTIES_ALBUM), str_album, ID2P(LANG_PROPERTIES_GENRE), str_genre, ID2P(LANG_PROPERTIES_COMMENT), str_comment, + ID2P(LANG_PROPERTIES_YEAR), str_year, ID2P(LANG_PROPERTIES_DURATION), str_duration, }; static const unsigned char* const props_dir[] = @@ -139,7 +141,9 @@ static bool file_properties(const char* selected_file) "%s", id3.genre_string ? id3.genre_string : ""); rb->snprintf(str_comment, sizeof str_comment, "%s", id3.comment ? id3.comment : ""); - num_properties += 7; + rb->snprintf(str_year, sizeof str_year, + "%s", id3.year_string ? id3.year_string : ""); + num_properties += 8; if (dur > 0) { -- cgit v1.2.3