feat: Add media details sidebar and date handling features, including media grouping by date
This commit is contained in:
@@ -67,7 +67,7 @@ impl MediaService for MediaServiceImpl {
|
||||
.await
|
||||
.unwrap()?;
|
||||
|
||||
let (storage_path_buf, _date_taken) = get_storage_path_and_date(&extracted_data, &filename);
|
||||
let (storage_path_buf, date_taken) = get_storage_path_and_date(&extracted_data, &filename);
|
||||
|
||||
let storage_path_str = self
|
||||
.persist_media_file(&file_bytes, &storage_path_buf)
|
||||
@@ -81,6 +81,7 @@ impl MediaService for MediaServiceImpl {
|
||||
storage_path_str,
|
||||
hash,
|
||||
file_size,
|
||||
date_taken,
|
||||
)
|
||||
.await?;
|
||||
|
||||
@@ -282,6 +283,7 @@ impl MediaServiceImpl {
|
||||
storage_path: String,
|
||||
hash: String,
|
||||
file_size: i64,
|
||||
date_taken: Option<chrono::DateTime<chrono::Utc>>,
|
||||
) -> CoreResult<Media> {
|
||||
let media_model = Media {
|
||||
id: Uuid::new_v4(),
|
||||
@@ -292,6 +294,7 @@ impl MediaServiceImpl {
|
||||
hash,
|
||||
created_at: chrono::Utc::now(),
|
||||
thumbnail_path: None,
|
||||
date_taken,
|
||||
};
|
||||
|
||||
self.repo.create(&media_model).await?;
|
||||
|
||||
Reference in New Issue
Block a user