Open BrightCandle opened 1 year ago
Some websites do not provide title, please try YouTube to see if it is normal
This is on Youtube. The files get named correctly if I don't add the environment parameter but the moment I do they get an ID name even when just using what should be the default.
I see. Can you post the full compose file?
This is what I am using that causes me issues.
version: "2.2"
services:
metube:
image: alexta69/metube
container_name: metube
restart: unless-stopped
ports:
- "8081:8081"
volumes:
- ${STORAGE}/Youtube:/downloads
environment:
- UID=${PUID}
- GID=${PGID}
- STATE_DIR=${STORAGE}/metube/
- OUTPUT_TEMPLATE="%(title)s.%(ext)s"
- YTDL_OPTIONS={"updatetime":false}
this works for me:
version: "2.2"
services:
metube:
image: alexta69/metube
container_name: metube
restart: unless-stopped
ports:
- "8081:8081"
volumes:
- ${STORAGE}/Youtube:/downloads
environment:
- UID=${PUID}
- GID=${PGID}
- STATE_DIR=${STORAGE}/metube/
- OUTPUT_TEMPLATE=%(title)s.%(ext)s
- YTDL_OPTIONS={"updatetime":false}
I have the same issue with the following docker-compose file.
image: ghcr.io/alexta69/metube
container_name: metube
restart: unless-stopped
environment:
- UID=${PUID}
- GID=${PGID}
- TZ=${TZ}
- STATE_DIR=.
- OUTPUT_TEMPLATE=%(playlist&{}/|)s%(playlist_index&{} - |)s%(title)s.%(ext)s
volumes:
- ${MEDIA_ROOT}/youtube:/downloads
ports:
- 4848:8081
When I tried with yt-dlp directly, the output file was what I expected.
yt-dlp.exe -s --print filename -o "%(playlist&{}/|)s%(playlist_index&{} - |)s%(title)s.%(ext)s" <youtube_playlist_url>
When I tried with yt-dlp directly, the output file was what I expected.
yt-dlp.exe -s --print filename -o "%(playlist&{}/|)s%(playlist_index&{} - |)s%(title)s.%(ext)s" <youtube_playlist_url>
can you use yt-dlp commandline in linux and see what's happend?
I tried in wsl2 (ubuntu) and it gave me the correct result as well.
yt-dlp -s --print filename -o "%(playlist&{}/|)s%(playlist_index&{} - |)s%(title)s.%(ext)s" "https://www.youtube.com/playlist?list=PLAqhIrjkxbuW9U8-vZ_s_cjKPT_FqRStI"
Correct output:
General Audience⧸1 - [1hr Talk] Intro to Large Language Models.webm
well...it works for me except your example playlist.
maybe try this https://www.youtube.com/watch?v=cLVCGEmkJs0&list=PL-JHk6egAofdrAEgO1xnRs-6fkMOvP1ZF
You're right, it works with your playlist. I will look at this further--it is probably the playlist itself. Thanks.
I am adding the environment variable in a docker_compose file as the following but instead of the title.ext I am seeing a random ID with no extension. I was trying to see if I could update the file naming but it appears setting the output template even to the default breaks the naming.
A glance at how the config gets loaded and how the template is used in the download has left me none the wiser as to how I should format this or what I have done wrong or if there is a bug.