diff options
Diffstat (limited to 'apps/screens.c')
-rw-r--r-- | apps/screens.c | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/apps/screens.c b/apps/screens.c index 4fd6c2c2e2..91280a72f1 100644 --- a/apps/screens.c +++ b/apps/screens.c | |||
@@ -387,10 +387,13 @@ static const int id3_headers[]= | |||
387 | LANG_ID3_ALBUM_GAIN, | 387 | LANG_ID3_ALBUM_GAIN, |
388 | LANG_FILESIZE, | 388 | LANG_FILESIZE, |
389 | LANG_ID3_PATH, | 389 | LANG_ID3_PATH, |
390 | LANG_DATE, | ||
391 | LANG_TIME, | ||
390 | }; | 392 | }; |
391 | 393 | ||
392 | struct id3view_info { | 394 | struct id3view_info { |
393 | struct mp3entry* id3; | 395 | struct mp3entry* id3; |
396 | struct tm *modified; | ||
394 | int count; | 397 | int count; |
395 | int playlist_display_index; | 398 | int playlist_display_index; |
396 | int playlist_amount; | 399 | int playlist_amount; |
@@ -488,6 +491,7 @@ static const char * id3_get_or_speak_info(int selected_item, void* data, | |||
488 | { | 491 | { |
489 | struct id3view_info *info = (struct id3view_info*)data; | 492 | struct id3view_info *info = (struct id3view_info*)data; |
490 | struct mp3entry* id3 =info->id3; | 493 | struct mp3entry* id3 =info->id3; |
494 | struct tm *tm = info->modified; | ||
491 | int info_no=selected_item/2; | 495 | int info_no=selected_item/2; |
492 | if(!(selected_item%2)) | 496 | if(!(selected_item%2)) |
493 | {/* header */ | 497 | {/* header */ |
@@ -662,6 +666,28 @@ static const char * id3_get_or_speak_info(int selected_item, void* data, | |||
662 | if(say_it && val) | 666 | if(say_it && val) |
663 | output_dyn_value(NULL, 0, id3->filesize, byte_units, 4, true); | 667 | output_dyn_value(NULL, 0, id3->filesize, byte_units, 4, true); |
664 | break; | 668 | break; |
669 | case LANG_DATE: | ||
670 | if (!tm) | ||
671 | return NULL; | ||
672 | |||
673 | snprintf(buffer, buffer_len, "%04d/%02d/%02d", | ||
674 | tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday); | ||
675 | |||
676 | val = buffer; | ||
677 | if (say_it) | ||
678 | talk_date(tm, true); | ||
679 | break; | ||
680 | case LANG_TIME: | ||
681 | if (!tm) | ||
682 | return NULL; | ||
683 | |||
684 | snprintf(buffer, buffer_len, "%02d:%02d:%02d", | ||
685 | tm->tm_hour, tm->tm_min, tm->tm_sec); | ||
686 | |||
687 | val = buffer; | ||
688 | if (say_it) | ||
689 | talk_time(tm, true); | ||
690 | break; | ||
665 | } | 691 | } |
666 | if((!val || !*val) && say_it) | 692 | if((!val || !*val) && say_it) |
667 | talk_id(LANG_ID3_NO_INFO, true); | 693 | talk_id(LANG_ID3_NO_INFO, true); |
@@ -688,7 +714,8 @@ static int id3_speak_item(int selected_item, void* data) | |||
688 | return 0; | 714 | return 0; |
689 | } | 715 | } |
690 | 716 | ||
691 | bool browse_id3(struct mp3entry *id3, int playlist_display_index, int playlist_amount) | 717 | bool browse_id3(struct mp3entry *id3, int playlist_display_index, int playlist_amount, |
718 | struct tm *modified) | ||
692 | { | 719 | { |
693 | struct gui_synclist id3_lists; | 720 | struct gui_synclist id3_lists; |
694 | int key; | 721 | int key; |
@@ -696,6 +723,7 @@ bool browse_id3(struct mp3entry *id3, int playlist_display_index, int playlist_a | |||
696 | struct id3view_info info; | 723 | struct id3view_info info; |
697 | info.count = 0; | 724 | info.count = 0; |
698 | info.id3 = id3; | 725 | info.id3 = id3; |
726 | info.modified = modified; | ||
699 | info.playlist_display_index = playlist_display_index; | 727 | info.playlist_display_index = playlist_display_index; |
700 | info.playlist_amount = playlist_amount; | 728 | info.playlist_amount = playlist_amount; |
701 | bool ret = false; | 729 | bool ret = false; |