Code Monkey home page Code Monkey logo

Comments (5)

radoslav006 avatar radoslav006 commented on June 2, 2024 1

@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.

deepjyoti30 avatar deepjyoti30 commented on June 2, 2024 1

Added in the latest release

from ytmdl.

deepjyoti30 avatar deepjyoti30 commented on June 2, 2024

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.

radoslav006 avatar radoslav006 commented on June 2, 2024

There are two problems with the config in my opinion:

  1. You have to modify config file every time you want to change a filename.
  2. 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.

deepjyoti30 avatar deepjyoti30 commented on June 2, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.