Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set download dir #36

Open
lukesturgis opened this issue Feb 10, 2022 · 3 comments
Open

set download dir #36

lukesturgis opened this issue Feb 10, 2022 · 3 comments

Comments

@lukesturgis
Copy link

it'd be nice if there was a way to have a data dir mounted via docker that you could have ytmdl automatically put songs in after complete, using the -o OUTPUT_DIR option. im happy to try and come up with a commit or pr if this is a desirable feature for others.

(first time creating a feature request for this repo, please lmk if i put this in the wrong spot.)

awesome tool by the way! using it all the time.

@deepjyoti30
Copy link
Owner

@lukesturgis That is a nice feature but the docker image provided in this repo is for the web version and it utilizes ytmdl apis to download the song.

I don't think the files are getting downloaded to the docker image.

If this is something you'd like in the cli tool, I can move this issue to that repo (https://github.com/deepjyoti30/ytmdl)

@rzalawad
Copy link

@deepjyoti30 Could you help me understand what

downloadSong: async function() {
is doing? I had though that the response body contained the music file as a payload which would then be downloaded by the user. I am not too familiar with JS/backend code.

Also, where can I find details on the API (if publically available)? Out of curiosity, why not run ytmdl inside the docker container and ship as part of the docker container? When the details of a music file are finalized, ytmdl can be launched inside as a process.

Looking forward to hearing your thoughts :)

@deepjyoti30
Copy link
Owner

deepjyoti30 commented Aug 25, 2023

is doing? I had though that the response body contained the music file as a payload which would then be downloaded by the user. I am not too familiar with JS/backend code.

This function is hitting the download endpoint of the Ytmdl Web API and getting the details of the song to be downloaded like the file URL, how long it is accessible etc.

As you can see it is writing the detail to a variable.

This variable is then passed as a prop to the DownloadButton component. So once the download details are fetched the button is ready to be clicked and when it is clicked, the song starts downloading.

Also, where can I find details on the API (if publically available)?

You cannot. It's not open source. I initially had plans of making the API open-source but due to lack of time I have decided to keep it as is.

Out of curiosity, why not run ytmdl inside the docker container and ship as part of the docker container?

When you say ytmdl are you referring to the ytmdl CLI? If that is so then the reason is if I keep the CLI in the same docker the web will have one CLI that can be triggerred once at a time to download the song. However I want the webapp to be asynchronous and work simultaneously for everyone.

This is where the API comes in where the API can accept multiple requests at the same time and moreover the current deployment of the API is running in three different nodes which makes it very reliable ( in the unlikely scenario of one node going down, the API will still be up).

Also, based on the other issue you had raise #74 , I think you are trying to understand the API and the web code to be able to create a script of some kind to run on your server? I would again say that the better approach for you would be to just use the CLI version of ytmdl that you can find here: https://github.com/deepjyoti30/ytmdl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants