fix(yt): cookies

This commit is contained in:
Kristofers Solo 2025-09-23 11:21:47 +03:00
parent b124a5bdc7
commit 6b7cab4032
Signed by: kristoferssolo
GPG Key ID: 74FF8144483D82C8
3 changed files with 4 additions and 3 deletions

View File

@ -44,3 +44,4 @@ RUN uv tool install instaloader \
WORKDIR /app
COPY --from=builder-rs /app/target/release/tg-relay-rs /usr/local/bin/tg-relay-rs
CMD ["/usr/local/bin/tg-relay-rs"]

View File

@ -7,9 +7,9 @@ services:
BINARY_NAME: tg-relay-rs
environment:
TELOXIDE_TOKEN: ${TELOXIDE_TOKEN}
COOKIES_PATH: ${COOKIES_PATH:-/app/yt-cookies.txt}
COOKIES_PATH: /app/yt-cookies.txt
RUST_LOG: ${RUST_LOG:-info}
restart: unless-stopped
volumes:
- ./comments.txt:/app/comments.txt:ro
- /etc/secrets/yt-cookies.txt:/app/yt-cookies.txt
- /etc/secrets/yt-cookies.txt:/app/yt-cookies.txt:rw

View File

@ -131,7 +131,7 @@ pub async fn download_ytdlp<P: AsRef<Path>>(
cookies_path: Option<P>,
) -> Result<DownloadResult> {
let format_selector = env::var("YTDLP_FORMAT").unwrap_or_else(|_| "best".into());
info!(format_selector = format_selector, "Video format");
info!(format_selector = format_selector, "video format");
let base_args = [
"--no-playlist",