diff options
author | James D. Smith <smithjd15@gmail.com> | 2021-09-15 20:27:31 -0600 |
---|---|---|
committer | James D. Smith <smithjd15@gmail.com> | 2021-09-15 21:56:50 -0600 |
commit | 7882e093b23f186f089abb91c245787cc2e04a62 (patch) | |
tree | eb74af454e23fe332d531e985e08db49aa701dc3 /apps | |
parent | 67c4231e34cd8147963a054c44a715f3413fb2e3 (diff) | |
download | rockbox-7882e093b23f186f089abb91c245787cc2e04a62.tar.gz rockbox-7882e093b23f186f089abb91c245787cc2e04a62.zip |
File properties plugin: Add album artist.
Change-Id: I150e11ba309953959d374898a63d4250a90651bb
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 667d1239ca..2aa6480aa4 100644 --- a/apps/lang/english.lang +++ b/apps/lang/english.lang | |||
@@ -15954,3 +15954,17 @@ | |||
15954 | *: "Reload After Saving" | 15954 | *: "Reload After Saving" |
15955 | </voice> | 15955 | </voice> |
15956 | </phrase> | 15956 | </phrase> |
15957 | <phrase> | ||
15958 | id: LANG_PROPERTIES_ALBUMARTIST | ||
15959 | desc: in properties plugin | ||
15960 | user: core | ||
15961 | <source> | ||
15962 | *: "[Album Artist]" | ||
15963 | </source> | ||
15964 | <dest> | ||
15965 | *: "[Album Artist]" | ||
15966 | </dest> | ||
15967 | <voice> | ||
15968 | *: "Album Artist" | ||
15969 | </voice> | ||
15970 | </phrase> | ||
diff --git a/apps/plugins/properties.c b/apps/plugins/properties.c index 0fa83c0b56..5e2ab5101c 100644 --- a/apps/plugins/properties.c +++ b/apps/plugins/properties.c | |||
@@ -34,6 +34,7 @@ char str_time[64]; | |||
34 | 34 | ||
35 | char str_title[MAX_PATH]; | 35 | char str_title[MAX_PATH]; |
36 | char str_artist[MAX_PATH]; | 36 | char str_artist[MAX_PATH]; |
37 | char str_albumartist[MAX_PATH]; | ||
37 | char str_album[MAX_PATH]; | 38 | char str_album[MAX_PATH]; |
38 | char str_duration[32]; | 39 | char str_duration[32]; |
39 | 40 | ||
@@ -52,6 +53,7 @@ static const unsigned char* const props_file[] = | |||
52 | ID2P(LANG_PROPERTIES_DATE), str_date, | 53 | ID2P(LANG_PROPERTIES_DATE), str_date, |
53 | ID2P(LANG_PROPERTIES_TIME), str_time, | 54 | ID2P(LANG_PROPERTIES_TIME), str_time, |
54 | ID2P(LANG_PROPERTIES_ARTIST), str_artist, | 55 | ID2P(LANG_PROPERTIES_ARTIST), str_artist, |
56 | ID2P(LANG_PROPERTIES_ALBUMARTIST), str_albumartist, | ||
55 | ID2P(LANG_PROPERTIES_TITLE), str_title, | 57 | ID2P(LANG_PROPERTIES_TITLE), str_title, |
56 | ID2P(LANG_PROPERTIES_ALBUM), str_album, | 58 | ID2P(LANG_PROPERTIES_ALBUM), str_album, |
57 | ID2P(LANG_PROPERTIES_DURATION), str_duration, | 59 | ID2P(LANG_PROPERTIES_DURATION), str_duration, |
@@ -119,11 +121,13 @@ static bool file_properties(const char* selected_file) | |||
119 | long dur = id3.length / 1000; /* seconds */ | 121 | long dur = id3.length / 1000; /* seconds */ |
120 | rb->snprintf(str_artist, sizeof str_artist, | 122 | rb->snprintf(str_artist, sizeof str_artist, |
121 | "%s", id3.artist ? id3.artist : ""); | 123 | "%s", id3.artist ? id3.artist : ""); |
124 | rb->snprintf(str_albumartist, sizeof str_albumartist, | ||
125 | "%s", id3.albumartist ? id3.albumartist : ""); | ||
122 | rb->snprintf(str_title, sizeof str_title, | 126 | rb->snprintf(str_title, sizeof str_title, |
123 | "%s", id3.title ? id3.title : ""); | 127 | "%s", id3.title ? id3.title : ""); |
124 | rb->snprintf(str_album, sizeof str_album, | 128 | rb->snprintf(str_album, sizeof str_album, |
125 | "%s", id3.album ? id3.album : ""); | 129 | "%s", id3.album ? id3.album : ""); |
126 | num_properties += 3; | 130 | num_properties += 4; |
127 | 131 | ||
128 | if (dur > 0) | 132 | if (dur > 0) |
129 | { | 133 | { |