deepjyoti30 / ytmdl

A simple app to get songs from YouTube in mp3 format with artist name, album name etc from sources like iTunes, Spotify, LastFM, Deezer, Gaana etc.
https://ytmdl.deepjyoti30.dev
MIT License
3.22k stars 164 forks source link

Allow overriding ytmdl config file every run #282

Closed hariprasanths closed 12 months ago

hariprasanths commented 1 year ago

Feature Request

Checklist

Description

Currently all the ytmdl instances use a global config - ~/.config/ytmdl. Support for overriding the config every run can help in automating multiple configurations with different providers/dynamic directories.

Something like the following ytmdl --ytdml-config ~/.config/ytmdl/spotifyConfig --url <>

deepjyoti30 commented 1 year ago

@hariprasanths Thanks for the request. I have seen this request come up a few while back as well, let me see if this can be done.

deepjyoti30 commented 1 year ago

@hariprasanths I checked on this and it will be hard to support that behaviour based on the current architecture of config in ytmdl. Unless I do a complete rework of how config is handled, this will not be possible.

hariprasanths commented 1 year ago

Will it be possible to have dynamic output paths via -o arg param? Or a combination of output path in dynamic path in config file? Something like this in the config file - $OutputPathFromArgs$Album$Artist

deepjyoti30 commented 1 year ago

@hariprasanths Let me check on that. Is your use-case just to be able to pass dynamic path params from the arguments?

hariprasanths commented 1 year ago

I am interested in overriding the providers and passing the dynamic output path on every run. Can work with the support to pass a dynamic output path via args.

hariprasanths commented 1 year ago

I am getting the following error when trying to download a playlist with 600+ songs: [Errno 24] Too many open files

Following are some the places where I think the files aren't closed: download archive file, song's cache file, artwork file

Shall I open a new issue for this?

deepjyoti30 commented 1 year ago

@hariprasanths Yes, a new issue is suggested.

deepjyoti30 commented 1 year ago

@hariprasanths Support for advanced path (dynamic naming) is added and will be included in the next release.

Just a sneak peak of how it will work:

ytmdl "sundown" --output-dir "/Users/deepjyoti30/Music\$Artist->Album->Title"
deepjyoti30 commented 12 months ago

@hariprasanths This is now included in the latest release!