File properties plugin: Add frequency.

Change-Id: I27453b39b5e4a6b4f97eff27a36c8ef2772ec092
This commit is contained in:
James D. Smith 2021-09-16 17:12:12 -06:00
parent 41e471e50e
commit a9d3e09611
2 changed files with 19 additions and 1 deletions

View File

@ -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>

View File

@ -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)
{