mirror of
https://github.com/kristoferssolo/tg-relay-rs.git
synced 2025-12-20 11:04:41 +00:00
Revert "fix: remove instagram session file"
This reverts commitebffa20ec9. Revert "fix: env var" This reverts commitd20d825905.
This commit is contained in:
parent
6a50806fa5
commit
ff21c5c519
@ -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
|
||||
|
||||
@ -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<DownloadResu
|
||||
/// - Propagates `run_command_in_tempdir` errors.
|
||||
#[cfg(feature = "instagram")]
|
||||
pub async fn download_instaloader(shortcode: &str) -> Result<DownloadResult> {
|
||||
fn get_env_var(name: &str) -> Result<String> {
|
||||
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",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user