summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames D. Smith <smithjd15@gmail.com>2021-09-15 21:06:37 -0600
committerJames D. Smith <smithjd15@gmail.com>2021-09-15 21:57:21 -0600
commit7035e2e2b9c9899d67b90adbe061347e18124f10 (patch)
tree5de8843c0854889a6341a1400ca19707099f942f
parent3acbab15a183f712d8ed3b3a073c92dbf42c17fd (diff)
File properties plugin: Add year.
Change-Id: I160507a67354c775ca9695c7e71303fe16beb6db
-rw-r--r--apps/lang/english.lang14
-rw-r--r--apps/plugins/properties.c6
2 files changed, 19 insertions, 1 deletions
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"
</voice>
</phrase>
+<phrase>
+ id: LANG_PROPERTIES_YEAR
+ desc: in properties plugin
+ user: core
+ <source>
+ *: "[Year]"
+ </source>
+ <dest>
+ *: "[Year]"
+ </dest>
+ <voice>
+ *: "Year"
+ </voice>
+</phrase>
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)
{