Comments (5)
@deepjyoti30 No problem, I just want to share my feedback to improve a tool that I find already very useful. Thank you for your engagement and openness.
from ytmdl.
Added in the latest release
from ytmdl.
You can apply it through config. Take a look at this part of the README
Since you said sometimes it fails with certain special characters: This is not an expected behaviour and ytmdl
does try to remove as many special characters as it can find but I would suggest you to open a bug report for that so I can add a fix for it.
My use case is running ytdml from my python script using subprocess module. It will be very convenient to have full control over a filename through cli.
Why don't you just use the ytmdl
api instead? You will have more flexibility that way and you will be easily able to set the filename and customize a lot more things. Considering you are writing a script in python, it's just a better way to use ytmdl
's API instead of using a subprocess.
That being said, I don't think a --filename
functionality will be much useful considering it can be achieved by modifying the config file. If more requests come in for this feature, I can consider it for sure!
from ytmdl.
There are two problems with the config in my opinion:
- You have to modify config file every time you want to change a filename.
- As the readme says:
SONG_DIR field also takes values that are extracted from the song being downloaded
The problem is that in my case about half of the music have no tags recognized (it is a music from a niche radio playlists), so in that case the dynamic filename cannot be created (artist / title are not recognized).
Why I use cli? It is just design decision - it is simpler to use ytmdl as a blackbox as in this case it has simple, well defined and documented interface.
I have a peek in the codebase, but for me it is too complex to bother, especially in this particular case - I have to search a while to just find where and how the filename is created. In my opinion there is lack of high level API. If I remember correctly I have to modify the code to be able to set the filename, I cannot pass it as an argument to some high level function.
As a solution for now I just download the song to the temporary folder and then rename and move it to a final location ;)
That just my thoughts :)
Best regards,
Radoslav
from ytmdl.
@radoslav006 Thanks for the explanation. I understand what your requirement is right now but there was never in the past a request to support this and as such ytmdl
was designed with keeping user interaction to the least in mind. Thus, there is no direct high level access for the directory.
However, I think I can add this feature in an upcoming release.
from ytmdl.
Related Issues (20)
- Fetching metadata from yt-dlp using --add-metadata HOT 7
- Ytmdl skipping meta without flags and deleting the downloaded file. HOT 1
- Why does it output 320 kbps MP3? HOT 2
- Super annoying to tag playlist HOT 1
- Automatic skipping of songs already HOT 1
- Didn't work: complaining about iTunes... HOT 7
- ytmdl --list YOUTUBE_PLAYLIST_URL ====> YOUTUBE_PLAYLIST_URL is empty HOT 1
- Question
- Allow overriding ytmdl config file every run HOT 9
- Windows "|" in song name issue again HOT 1
- Zombie files buildup HOT 1
- Saavn songs doesn't have 100x100 album art HOT 1
- Add sponsorblock support HOT 1
- [Bug] Errors from missing videos in playlists don't seem to be handled gracefully.
- [Premium Youtube Music] can't download premium only songs! HOT 1
- Crash on ampersand in artist HOT 2
- "UnicodeEncodeError: 'charmap' codec can't encode character" when trying to download a song. HOT 3
- [FEATURE REQUEST] Consider dropping/replacing ffmpeg-python dependency because of future transitive dependency HOT 2
- Add support for showing `album name` in the metadata results
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ytmdl.