mirror of
https://github.com/flibusta-apps/telegram_files_cache_server.git
synced 2025-12-06 14:45:36 +01:00
Fix
This commit is contained in:
@@ -3,7 +3,7 @@ use serde::Deserialize;
|
|||||||
|
|
||||||
#[derive(Deserialize, Debug, Clone)]
|
#[derive(Deserialize, Debug, Clone)]
|
||||||
pub struct Source {
|
pub struct Source {
|
||||||
// id: u32,
|
pub id: u32,
|
||||||
// name: String
|
// name: String
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -23,6 +23,7 @@ pub struct Book {
|
|||||||
pub file_type: String,
|
pub file_type: String,
|
||||||
pub uploaded: String,
|
pub uploaded: String,
|
||||||
pub authors: Vec<BookAuthor>,
|
pub authors: Vec<BookAuthor>,
|
||||||
|
pub source: Source,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize, Debug, Clone)]
|
#[derive(Deserialize, Debug, Clone)]
|
||||||
@@ -34,6 +35,7 @@ pub struct BookWithRemote {
|
|||||||
pub file_type: String,
|
pub file_type: String,
|
||||||
pub uploaded: String,
|
pub uploaded: String,
|
||||||
pub authors: Vec<BookAuthor>,
|
pub authors: Vec<BookAuthor>,
|
||||||
|
pub source: Source,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize, Debug, Clone)]
|
#[derive(Deserialize, Debug, Clone)]
|
||||||
@@ -51,7 +53,8 @@ impl BookWithRemote {
|
|||||||
lang: book.lang,
|
lang: book.lang,
|
||||||
file_type: book.file_type,
|
file_type: book.file_type,
|
||||||
uploaded: book.uploaded,
|
uploaded: book.uploaded,
|
||||||
authors: book.authors
|
authors: book.authors,
|
||||||
|
source: book.source,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ pub async fn cache_file(
|
|||||||
};
|
};
|
||||||
|
|
||||||
let downloader_result = match download_from_downloader(
|
let downloader_result = match download_from_downloader(
|
||||||
book.remote_id,
|
book.source.id,
|
||||||
object_id,
|
object_id,
|
||||||
object_type.clone()
|
object_type.clone()
|
||||||
).await {
|
).await {
|
||||||
|
|||||||
Reference in New Issue
Block a user