diff options
author | James D. Smith <smithjd15@gmail.com> | 2021-09-15 21:06:37 -0600 |
---|---|---|
committer | James D. Smith <smithjd15@gmail.com> | 2021-09-15 21:57:21 -0600 |
commit | 7035e2e2b9c9899d67b90adbe061347e18124f10 (patch) | |
tree | 5de8843c0854889a6341a1400ca19707099f942f /apps | |
parent | 3acbab15a183f712d8ed3b3a073c92dbf42c17fd (diff) | |
download | rockbox-7035e2e2b9c9899d67b90adbe061347e18124f10.tar.gz rockbox-7035e2e2b9c9899d67b90adbe061347e18124f10.zip |
File properties plugin: Add year.
Change-Id: I160507a67354c775ca9695c7e71303fe16beb6db
Diffstat (limited to 'apps')
-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 0f5bf23e9a..66ca47b176 100644 --- a/apps/lang/english.lang +++ b/apps/lang/english.lang | |||
@@ -16010,3 +16010,17 @@ | |||
16010 | *: "Composer" | 16010 | *: "Composer" |
16011 | </voice> | 16011 | </voice> |
16012 | </phrase> | 16012 | </phrase> |
16013 | <phrase> | ||
16014 | id: LANG_PROPERTIES_YEAR | ||
16015 | desc: in properties plugin | ||
16016 | user: core | ||
16017 | <source> | ||
16018 | *: "[Year]" | ||
16019 | </source> | ||
16020 | <dest> | ||
16021 | *: "[Year]" | ||
16022 | </dest> | ||
16023 | <voice> | ||
16024 | *: "Year" | ||
16025 | </voice> | ||
16026 | </phrase> | ||
diff --git a/apps/plugins/properties.c b/apps/plugins/properties.c index 07a953c432..620c08a332 100644 --- a/apps/plugins/properties.c +++ b/apps/plugins/properties.c | |||
@@ -39,6 +39,7 @@ char str_albumartist[MAX_PATH]; | |||
39 | char str_album[MAX_PATH]; | 39 | char str_album[MAX_PATH]; |
40 | char str_genre[MAX_PATH]; | 40 | char str_genre[MAX_PATH]; |
41 | char str_comment[MAX_PATH]; | 41 | char str_comment[MAX_PATH]; |
42 | char str_year[MAX_PATH]; | ||
42 | char str_duration[32]; | 43 | char str_duration[32]; |
43 | 44 | ||
44 | unsigned nseconds; | 45 | unsigned nseconds; |
@@ -62,6 +63,7 @@ static const unsigned char* const props_file[] = | |||
62 | ID2P(LANG_PROPERTIES_ALBUM), str_album, | 63 | ID2P(LANG_PROPERTIES_ALBUM), str_album, |
63 | ID2P(LANG_PROPERTIES_GENRE), str_genre, | 64 | ID2P(LANG_PROPERTIES_GENRE), str_genre, |
64 | ID2P(LANG_PROPERTIES_COMMENT), str_comment, | 65 | ID2P(LANG_PROPERTIES_COMMENT), str_comment, |
66 | ID2P(LANG_PROPERTIES_YEAR), str_year, | ||
65 | ID2P(LANG_PROPERTIES_DURATION), str_duration, | 67 | ID2P(LANG_PROPERTIES_DURATION), str_duration, |
66 | }; | 68 | }; |
67 | static const unsigned char* const props_dir[] = | 69 | static const unsigned char* const props_dir[] = |
@@ -139,7 +141,9 @@ static bool file_properties(const char* selected_file) | |||
139 | "%s", id3.genre_string ? id3.genre_string : ""); | 141 | "%s", id3.genre_string ? id3.genre_string : ""); |
140 | rb->snprintf(str_comment, sizeof str_comment, | 142 | rb->snprintf(str_comment, sizeof str_comment, |
141 | "%s", id3.comment ? id3.comment : ""); | 143 | "%s", id3.comment ? id3.comment : ""); |
142 | num_properties += 7; | 144 | rb->snprintf(str_year, sizeof str_year, |
145 | "%s", id3.year_string ? id3.year_string : ""); | ||
146 | num_properties += 8; | ||
143 | 147 | ||
144 | if (dur > 0) | 148 | if (dur > 0) |
145 | { | 149 | { |