Show basic film properties in media modal

This commit is contained in:
Reinout Meliesie 2025-02-12 15:59:54 +01:00
commit 462a644952
Signed by: zedfrigg
GPG key ID: 3AFCC06481308BC6
4 changed files with 50 additions and 18 deletions

View file

@ -87,28 +87,26 @@ impl < A : MediaAdapter > CollatedMediaGrid <A> {
media . get_name () . as_str () ,
) ) ,
match media . get_original_name () {
Some (original_name) => Some ( label ! (
@ justify : Justification :: Center ;
@ wrap : true ;
@ max_width_chars : 1 ; // Not the actual limit, used instead to wrap more aggressively
original_name . as_str () ,
) ) ,
None => None ,
} . as_ref () ,
media . get_original_name () . map ( |original_name| label ! (
@ justify : Justification :: Center ;
@ wrap : true ;
@ max_width_chars : 1 ; // Not the actual limit, used instead to wrap more aggressively
original_name . as_str () ,
) ) . as_ref () ,
Some ( & g_box ! (
@ option_children ;
@ orientation : Horizontal ;
@ halign : Center ;
@ spacing : 20 ;
Some ( & label ! ( media . get_release_date () . as_str () ) ) ,
match media . get_runtime_minutes () {
Some (runtime_minutes) => Some (
label ! ( format ! ( "{}m" , runtime_minutes ) . as_str () ) ,
) ,
None => None ,
} . as_ref () ,
Some ( & label ! (
media . get_release_date () . split ('-') . next () . unwrap () ,
) ) ,
media . get_runtime_minutes () . map (
|runtime_minutes| label ! ( format ! ( "{}m" , runtime_minutes ) . as_str () ) ,
) . as_ref () ,
) ) ,
) ,
)