File properties plugin: Add year.

Change-Id: I160507a67354c775ca9695c7e71303fe16beb6db
This commit is contained in:
James D. Smith 2021-09-15 21:06:37 -06:00
parent 3acbab15a1
commit 7035e2e2b9
2 changed files with 19 additions and 1 deletions

View File

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

View File

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