alexta69 / metube

Self-hosted YouTube downloader (web UI for youtube-dl / yt-dlp)
GNU Affero General Public License v3.0
6.79k stars 426 forks source link

OUTPUT_TEMPLATE_PLAYLIST doesn't inherit OUTPUT_TEMPLATE when empty #504

Open loomweaver opened 2 months ago

loomweaver commented 2 months ago

I am still experiencing #497 on latest (2024-08-22), not for individual videos, but when attempting to scrape a channel.

Trimmed docker-compose:

version: "3"
services:
  metube:
    image: ghcr.io/alexta69/metube
    environment:
      - 'AUDIO_DOWNLOAD_DIR=/audio-downloads'
      - 'CUSTOM_DIRS=false'
      - 'CREATE_CUSTOM_DIRS=false'
      - 'YTDL_OPTIONS={"writesubtitles":true,"subtitleslangs":["en","-live_chat"], "subtitlesformat":"ass", "download_archive":"/downloads/download_archive.txt"}'
      - 'OUTPUT_TEMPLATE=%(webpage_url_domain)S/%(channel)S (%(channel_id)S)/(%(timestamp>%Y-%m-%d-%H-%M-%S)S) %(title)S (%(height)sp-%(id)S).%(ext)s'

For example, downloading https://www.youtube.com/channel/UCBa659QWEk1AI4Tg--mrJ2A/videos places the folder into /downloads/Tom Scott - Videos rather than adhering to OUTPUT_TEMPLATE formatting.

I think the issue is that OUTPUT_TEMPLATE_PLAYLIST doesn't implicitly inherit the value of OUTPUT_TEMPLATE, since setting OUTPUT_TEMPLATE_PLAYLIST explicitly works correctly and as expected.

alexta69 commented 2 months ago

@labmonkey can you take a look?