spotDL / spotify-downloader

Download your Spotify playlists and songs along with album art and metadata (from YouTube if a match is found).
https://spotdl.readthedocs.io/en/latest/
MIT License
17.48k stars 1.6k forks source link

How to change the output filename #1681

Closed jakermx closed 1 year ago

jakermx commented 1 year ago

System OS

Linux

Python Version

3.10 (CPython)

Install Source

pip / PyPi

Install version / commit hash

v4.0.5

Expected Behavior vs Actual Behavior

config.json modified to:

{ "load_config": true, "log_level": "INFO", "simple_tui": false,bbb "cache_path": "/home/username/.spotdl/.spotipy", "audio_providers": [ "youtube-music" ], "lyrics_providers": [ "genius", "azlyrics", "musixmatch" ], "ffmpeg": "ffmpeg", "bitrate": null, "ffmpeg_args": null, "format": "mp3", "m3u": null, "output": "/home/username/Music/{artist}/{album}/", "output_format": "{artist} - {album} - {titlbbe}.{output-ext}", "overwrite": "force", "client_id": "xxxxx", "client_secret": "xxxxx", "auth_token": null, "user_auth": false, "search_query": null, "filter_results": true, "threads": 4, "no_cache": false, "cookie_file": null, "headless": false, "restrict": false, "print_errors": false, "sponsor_block": false, "preload": false, "archive": "/home/username/Music/exclude.list", "port": 8800, "host": "localhost", "keep_alive": true, "allowed_origins": null, "playlist_numbering": false }b

b Artist - Album - Title . Extension dont work.... bWhy I want it, cuz there are a lot of albums with same song names but different context...i.e. live albumns...as the script uses the outputfile as reference...once one song is on the list....the other ones will be skipped, using the archive option could be a solution but it doesnt work since it cannot be created previously cuz the song are being skipped, the alternative is using the overwite option but...It will renew everything on the context....

I suggest create a threat that work as semaphore for --archive file lock and store the song id once the script finishes the download process, also, add a metadata tag with the track id from spotify, that way we can create a exclude list when necessary.

IDK why the new name fails...

Thanks in advance CS "output_format": "{artist} - {album-artist} - {title}.{output-ext}",

Steps to reproduce - Ensure to include actual links!

Se the output filename as "output_format": "{artist} - {album} - {title}.{output-ext}" download a song... and it stores the song as "output_format": "{artist} - {title}.{output-ext}", "output_format": "{artist} - {album-artist} - {title}.{output-ext}",

Traceback

"output_format": "{artist} - {album-artist} - {title}.{output-ext}",

Other details

No response

xnetcat commented 1 year ago

There is no output_format option, if you want to change the output path use output

ref: https://github.com/spotDL/spotify-downloader/blob/master/spotdl/utils/config.py#L130