From ff21c5c519545d136e6351da03f10016673e2894 Mon Sep 17 00:00:00 2001 From: Kristofers Solo Date: Mon, 27 Oct 2025 07:57:56 +0200 Subject: [PATCH] Revert "fix: remove instagram session file" This reverts commit ebffa20ec9114a60579e6a63850201eebde5aebd. Revert "fix: env var" This reverts commit d20d8259050ea8e0810eff99f46e499128ed6842. --- Dockerfile | 2 +- src/download.rs | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 15d3084..a6ce2b2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,7 @@ COPY --from=planner /app/recipe.json recipe.json RUN cargo chef cook --release --recipe-path recipe.json # Build application COPY . . -RUN cargo build --release --no-default-features --features youtube +RUN cargo build --release FROM ghcr.io/astral-sh/uv:trixie-slim AS builder-py diff --git a/src/download.rs b/src/download.rs index 460818f..3edcabf 100644 --- a/src/download.rs +++ b/src/download.rs @@ -8,6 +8,7 @@ use crate::{ use futures::{StreamExt, stream}; use std::{ cmp::min, + env, ffi::OsStr, fs::{self, metadata}, path::{Path, PathBuf}, @@ -110,7 +111,14 @@ async fn run_command_in_tempdir(cmd: &str, args: &[&str]) -> Result Result { + fn get_env_var(name: &str) -> Result { + env::var(name).map_err(|_| Error::env(name)) + } + let session_file = get_env_var("IG_SESSION_PATH")?; + let args = [ + "--sessionfile", + &session_file, "--dirname-pattern=.", "--no-metadata-json", "--no-compress-json",