summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames D. Smith <smithjd15@gmail.com>2021-09-16 17:12:12 -0600
committerJames D. Smith <smithjd15@gmail.com>2021-09-16 17:52:53 -0600
commita9d3e096110674fa7147c2b3ada91ab7c67a7bd2 (patch)
treee0ff209ee787166cc8791f9bbe8f63484ef230eb
parent41e471e50e2d5b84c091f0574c0a0ee768092653 (diff)
File properties plugin: Add frequency.
Change-Id: I27453b39b5e4a6b4f97eff27a36c8ef2772ec092
-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 d73f555ebb..b795762828 100644
--- a/apps/lang/english.lang
+++ b/apps/lang/english.lang
@@ -16052,3 +16052,17 @@
*: "Disc number"
</voice>
</phrase>
+<phrase>
+ id: LANG_PROPERTIES_FREQUENCY
+ desc: in properties plugin
+ user: core
+ <source>
+ *: "[Frequency]"
+ </source>
+ <dest>
+ *: "[Frequency]"
+ </dest>
+ <voice>
+ *: "Frequency"
+ </voice>
+</phrase>
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)
{