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 | |
parent | f3874bda6404de75e431e7fa5004960a17be2c96 (diff) |
File properties plugin: Add composer.
Change-Id: I7123ad21af15483594b9d247b89f7712c3a1a6f0
-rw-r--r-- | apps/lang/english.lang | 14 | ||||
-rw-r--r-- | apps/plugins/properties.c | 6 |
2 files changed, 19 insertions, 1 deletions
diff --git a/apps/lang/english.lang b/apps/lang/english.lang index 7d0d940b91..0f5bf23e9a 100644 --- a/apps/lang/english.lang +++ b/apps/lang/english.lang @@ -15996,3 +15996,17 @@ *: "Comment" </voice> </phrase> +<phrase> + id: LANG_PROPERTIES_COMPOSER + desc: in properties plugin + user: core + <source> + *: "[Composer]" + </source> + <dest> + *: "[Composer]" + </dest> + <voice> + *: "Composer" + </voice> +</phrase> 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]; char str_time[64]; char str_title[MAX_PATH]; +char str_composer[MAX_PATH]; char str_artist[MAX_PATH]; char str_albumartist[MAX_PATH]; char str_album[MAX_PATH]; @@ -54,6 +55,7 @@ static const unsigned char* const props_file[] = ID2P(LANG_PROPERTIES_SIZE), str_size, ID2P(LANG_PROPERTIES_DATE), str_date, ID2P(LANG_PROPERTIES_TIME), str_time, + ID2P(LANG_PROPERTIES_COMPOSER), str_composer, ID2P(LANG_PROPERTIES_ARTIST), str_artist, ID2P(LANG_PROPERTIES_ALBUMARTIST), str_albumartist, ID2P(LANG_PROPERTIES_TITLE), str_title, @@ -123,6 +125,8 @@ static bool file_properties(const char* selected_file) rb->get_metadata(&id3, fd, selected_file)) { long dur = id3.length / 1000; /* seconds */ + rb->snprintf(str_composer, sizeof str_composer, + "%s", id3.composer ? id3.composer : ""); rb->snprintf(str_artist, sizeof str_artist, "%s", id3.artist ? id3.artist : ""); rb->snprintf(str_albumartist, sizeof str_albumartist, @@ -135,7 +139,7 @@ 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 += 6; + num_properties += 7; if (dur > 0) { |