diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/folders/media_files/list_folder_media_files_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/folders/media_files/list_folder_media_files_handler.rs index 5114e8e942..84bcde4871 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/folders/media_files/list_folder_media_files_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/folders/media_files/list_folder_media_files_handler.rs @@ -55,15 +55,15 @@ pub struct ListFolderMediaFilesSuccessResponse { pub struct FolderMediaFileListItem { pub token: MediaFileToken, - /// When the media file was added to the folder. - pub added_to_folder_at: DateTime, - /// Coarse-grained class (image / video / audio / dimensional). pub media_class: MediaFileClass, /// Specific format (jpg, png, mp4, etc.) — closer to a MIME type. pub media_type: MediaFileType, + /// Link to the prompt + pub maybe_prompt_token: Option, + /// If this file was generated as part of a batch, the batch token — /// useful for showing "siblings" in the UI. pub maybe_batch_token: Option, @@ -77,23 +77,25 @@ pub struct FolderMediaFileListItem { /// (image_index + color_index) the frontend uses for placeholders. pub cover_image: MediaFileCoverImageDetails, - pub creator_set_visibility: Visibility, - pub is_user_upload: bool, - pub is_intermediate_system_file: bool, - pub maybe_title: Option, - pub maybe_prompt_token: Option, - pub maybe_origin_filename: Option, - - /// Duration for audio and video files, if available. Milliseconds. - pub maybe_duration_millis: Option, + pub maybe_original_filename: Option, /// Original pixel width / height for image and video files when known. pub maybe_frame_width: Option, pub maybe_frame_height: Option, + /// Duration for audio and video files, if available. Milliseconds. + pub maybe_duration_millis: Option, + + pub creator_set_visibility: Visibility, + pub is_user_upload: bool, + pub is_intermediate_system_file: bool, + pub created_at: DateTime, pub updated_at: DateTime, + + /// When the media file was added to the folder. + pub added_to_folder_at: DateTime, } // ── Handler ── @@ -229,7 +231,7 @@ fn folder_media_file_row_to_list_item( is_intermediate_system_file: row.is_intermediate_system_file, maybe_title: row.maybe_title, maybe_prompt_token: row.maybe_prompt_token, - maybe_origin_filename: row.maybe_origin_filename, + maybe_original_filename: row.maybe_origin_filename, // Schema stores `INT(10)`; widen to u64 for the wire shape. maybe_duration_millis: row.maybe_duration_millis.map(|n| n as u64), maybe_frame_width: row.maybe_frame_width,