From f3358eb20a9a07b6788fd9cf9d58cffb0e072342 Mon Sep 17 00:00:00 2001 From: Christian Soffke Date: Sun, 10 Apr 2022 06:29:01 +0200 Subject: Properties plugin: Eliminate redundant Track Info code When opening an audio file from the file browser or database using the Properties plugin, it will now use existing code from the Show Track Info screen for displaying metadata. The menu option has been renamed accordingly. Change-Id: I5a824865b9f980151b91aff3c3c18ec45830a12c --- apps/screens.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'apps/screens.c') diff --git a/apps/screens.c b/apps/screens.c index 5d56906b90..24d1fed915 100644 --- a/apps/screens.c +++ b/apps/screens.c @@ -595,6 +595,8 @@ static const char * id3_get_or_speak_info(int selected_item, void* data, talk_value(id3->length /1000, UNIT_TIME, true); break; case LANG_ID3_PLAYLIST: + if (info->playlist_display_index == 0 || info->playlist_amount == 0 ) + return NULL; snprintf(buffer, buffer_len, "%d/%d", info->playlist_display_index, info->playlist_amount); val=buffer; @@ -708,6 +710,7 @@ bool browse_id3(struct mp3entry *id3, int playlist_display_index, int playlist_a if(global_settings.talk_menu) gui_synclist_set_voice_callback(&id3_lists, id3_speak_item); gui_synclist_set_nb_items(&id3_lists, info.count*2); + gui_synclist_set_title(&id3_lists, str(LANG_TRACK_INFO), NOICON); gui_synclist_draw(&id3_lists); gui_synclist_speak_item(&id3_lists); while (true) { -- cgit v1.2.3