mirror of
https://github.com/flibusta-apps/telegram_files_cache_server.git
synced 2025-12-06 06:35:38 +01:00
Fix
This commit is contained in:
@@ -28,12 +28,12 @@ impl std::error::Error for DownloadError {}
|
|||||||
|
|
||||||
|
|
||||||
pub async fn download_from_downloader(
|
pub async fn download_from_downloader(
|
||||||
|
source_id: u32,
|
||||||
remote_id: u32,
|
remote_id: u32,
|
||||||
object_id: i32,
|
|
||||||
object_type: String
|
object_type: String
|
||||||
) -> Result<Response, Box<dyn std::error::Error + Send + Sync>> {
|
) -> Result<Response, Box<dyn std::error::Error + Send + Sync>> {
|
||||||
let url = format!(
|
let url = format!(
|
||||||
"{}/download/{remote_id}/{object_id}/{object_type}",
|
"{}/download/{source_id}/{remote_id}/{object_type}",
|
||||||
CONFIG.downloader_url
|
CONFIG.downloader_url
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ pub async fn cache_file(
|
|||||||
|
|
||||||
let downloader_result = match download_from_downloader(
|
let downloader_result = match download_from_downloader(
|
||||||
book.source.id,
|
book.source.id,
|
||||||
object_id,
|
book.remote_id,
|
||||||
object_type.clone()
|
object_type.clone()
|
||||||
).await {
|
).await {
|
||||||
Ok(v) => v,
|
Ok(v) => v,
|
||||||
|
|||||||
Reference in New Issue
Block a user