From a9d3e096110674fa7147c2b3ada91ab7c67a7bd2 Mon Sep 17 00:00:00 2001 From: "James D. Smith" Date: Thu, 16 Sep 2021 17:12:12 -0600 Subject: File properties plugin: Add frequency. Change-Id: I27453b39b5e4a6b4f97eff27a36c8ef2772ec092 --- 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 d73f555ebb..b795762828 100644 --- a/apps/lang/english.lang +++ b/apps/lang/english.lang @@ -16052,3 +16052,17 @@ *: "Disc number" + + id: LANG_PROPERTIES_FREQUENCY + desc: in properties plugin + user: core + + *: "[Frequency]" + + + *: "[Frequency]" + + + *: "Frequency" + + diff --git a/apps/plugins/properties.c b/apps/plugins/properties.c index e2c83217a4..12ea25f0c0 100644 --- a/apps/plugins/properties.c +++ b/apps/plugins/properties.c @@ -43,6 +43,7 @@ char str_year[MAX_PATH]; char str_discnum[MAX_PATH]; char str_tracknum[MAX_PATH]; char str_duration[32]; +char str_frequency[32]; unsigned nseconds; unsigned long nsize; @@ -69,6 +70,7 @@ static const unsigned char* const props_file[] = ID2P(LANG_PROPERTIES_DISCNUM), str_discnum, ID2P(LANG_PROPERTIES_TRACKNUM), str_tracknum, ID2P(LANG_PROPERTIES_DURATION), str_duration, + ID2P(LANG_PROPERTIES_FREQUENCY), str_frequency, }; static const unsigned char* const props_dir[] = { @@ -151,7 +153,9 @@ static bool file_properties(const char* selected_file) "%s", id3.disc_string ? id3.disc_string : ""); rb->snprintf(str_tracknum, sizeof str_tracknum, "%s", id3.track_string ? id3.track_string : ""); - num_properties += 10; + rb->snprintf(str_frequency, sizeof str_frequency, + "%ld Hz", id3.frequency ? : 0); + num_properties += 11; if (dur > 0) { -- cgit v1.2.3