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

Accept URL as input #7

Closed
arsaboo opened this issue Mar 9, 2023 · 10 comments
Closed

Accept URL as input #7

arsaboo opened this issue Mar 9, 2023 · 10 comments
Labels
enhancement New feature or request

Comments

@arsaboo
Copy link
Contributor

arsaboo commented Mar 9, 2023

Instead of searching, I was wondering if we can add a feature to directly provide a URL. The search is not perfect.

@Liupold
Copy link
Owner

Liupold commented Mar 10, 2023

Yes, this would be great!

@arsaboo
Copy link
Contributor Author

arsaboo commented Mar 10, 2023

Since both -u and -l are taken, maybe we add another option -r (for resource) to provide the URL of the track/album.

@Liupold
Copy link
Owner

Liupold commented Mar 11, 2023

Or maybe we can detect the URL using regex. If the search is a valid URL then just download / use that.

@arsaboo
Copy link
Contributor Author

arsaboo commented Mar 11, 2023

Even better...love that. Would you take a look at implementing this? I looked at the code but am a little lost. I am assuming, we parse "prompt_input to check if it is a valid URL. Not sure which function to pass the URL to.

@Liupold Liupold added enhancement New feature or request help wanted Extra attention is needed labels Mar 11, 2023
@Liupold
Copy link
Owner

Liupold commented Mar 11, 2023

Here is the variable which contains the initial search

search = ' '.join(search)

I would suggest you hook url from there. BTW if you are willing to work with prompt I would suggest to rewrite. (It's Buggy at best).

Here is where the song object is created.
(You need to extract the song id somehow). [Look into jiosavan APIs available in github ]

song_ = Song(songid=song_id,

Sorry, I have a lot of things going on now, will love to work on this ASAP. Can't promise a deadline though.

@Liupold Liupold removed the help wanted Extra attention is needed label Mar 12, 2023
Liupold added a commit that referenced this issue Mar 12, 2023
@Liupold
Copy link
Owner

Liupold commented Mar 12, 2023

urls are now supported, try

fmdpy "YOUR URL HERE"

@Liupold
Copy link
Owner

Liupold commented Mar 12, 2023

Try it out and verify that it's working. I will fix the prompt before releasing. And Will implement the folder feature requested (no promises). @arsaboo

@Liupold
Copy link
Owner

Liupold commented Mar 12, 2023

Directory management is also added. (It wasn't as difficult as i thought it would be). Anyways do try them out. After that i will create a release.

@arsaboo
Copy link
Contributor Author

arsaboo commented Mar 12, 2023

This is great. Works very well. This is a much better way of doing things than what I was trying. Appreciate the cleanup as well. Closing the issue now...

@arsaboo arsaboo closed this as completed Mar 12, 2023
@Liupold
Copy link
Owner

Liupold commented Mar 12, 2023

Just for the record, Album URLs are also supported.

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

No branches or pull requests

2 participants