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

Added Support for downloads from text files and also added a lyrics provider. #859

Merged
12 commits merged into from
Oct 19, 2020
Merged

Conversation

s1as3r
Copy link
Contributor

@s1as3r s1as3r commented Sep 30, 2020

  • Added support for downloads from a text file.
  • Now also adds lyrics to the downloaded song.

@s1as3r s1as3r changed the title Added ability to download songs from a text file. Added Support for downloads from text files and also added a lyrics provider. Oct 1, 2020
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please look through the CONTRIBUTING.md

If you'd have let me know when you were in the dev phase, most of the issues could have been sorted out b4 you put in so much effort.

I'll ask the community for feedback on lyrics. and let you know if the feature has to be added within the week. You can delay changes until then if you wish or start working on them when free.

spotdl/download/downloader.py Outdated Show resolved Hide resolved
spotdl/search/songObj.py Show resolved Hide resolved
spotdl/search/utils.py Outdated Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
spotdl/__main__.py Outdated Show resolved Hide resolved
spotdl/__main__.py Outdated Show resolved Hide resolved
@ghost ghost mentioned this pull request Oct 4, 2020
@ghost
Copy link

ghost commented Oct 7, 2020

Well @phcreery is working on a better cli. So tqdm might be removed. Look into his work at his fork if you wish. His stuff will take some time though.

@s1as3r
Copy link
Contributor Author

s1as3r commented Oct 7, 2020

Instead of using download_single_song() I've now implemented download_multiple_songs(). So, I guess, tqdm won't break now.

@ghost
Copy link

ghost commented Oct 7, 2020

Cool, so we using genius or music match?

@s1as3r
Copy link
Contributor Author

s1as3r commented Oct 7, 2020

Genius, because it doesn't have a limit on its api tokens.
But i think i can implement musixmatch without even using it's api. I'll give it a try a if it seems promising, I'll use it.

@ghost
Copy link

ghost commented Oct 7, 2020

So we aren't scrapping music match with re?

That would be so much better. Spotify and music match have a deal so almost all spotify songs have time synched lyrics on musicmatch.

@ghost
Copy link

ghost commented Oct 7, 2020

Well at least for now, not a lot of people are voting on features. That's sad. Yours has among the most traction.

If it gets through (at least 10 upvotes) genius is cool. We could add better providers later.

@ghost
Copy link

ghost commented Oct 7, 2020

Any idea on how to get more people to vote?

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll be going through your code properly (offline, in an editor) in the next few days. To catch all the not so obvious changes needed.

spotdl/download/downloader.py Outdated Show resolved Hide resolved
spotdl/search/songObj.py Show resolved Hide resolved
spotdl/search/songObj.py Outdated Show resolved Hide resolved
@ghost
Copy link

ghost commented Oct 10, 2020

Please 'resolve conversation' my comments when they're fixed/no longer relevant.

@s1as3r
Copy link
Contributor Author

s1as3r commented Oct 10, 2020

I'll make all the changes within a day or two. I'm kinda busy rn.

@ghost
Copy link

ghost commented Oct 10, 2020

Sure, I'm actually very busy rn. Take your time, I may not be able to look up your changes for like a week.

spotdl/search/songObj.py Outdated Show resolved Hide resolved
spotdl/search/provider.py Outdated Show resolved Hide resolved
@ghost
Copy link

ghost commented Oct 14, 2020

Sorry to keep you waiting. Ik its frustrating to wait. I'll test it and merge it by today. And please change the destination branch to spotDL:next-rel-dev

@s1as3r s1as3r changed the base branch from master to next-rel-dev October 14, 2020 16:05
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works, It some of the very best code I've seen to date.

Excellent!

Just the 1 or 2 single-line edits in provider.py and this is good to go. I won't be reviewing this again. You have the all clear.

Great job.

print('Fetching songs from %s...' % request)
songObjList = []

with open(request, 'r') as songFile:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CliArgs is a list, it's much more simpler to add the links to CliArgs - that way, the .txt file can have song, playlist and album links and still work.

From a maintenance standpoint, fewer lines of code is always better.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But, there's a catch, if the .txt file is the last argument, spotdl will just skip the songs. And it won't be able to take advantage of parallel downloads.

spotdl/search/provider.py Outdated Show resolved Hide resolved
spotdl/search/provider.py Show resolved Hide resolved
spotdl/search/provider.py Outdated Show resolved Hide resolved
spotdl/search/provider.py Show resolved Hide resolved
spotdl/search/provider.py Show resolved Hide resolved
spotdl/search/provider.py Show resolved Hide resolved
spotdl/search/songObj.py Outdated Show resolved Hide resolved
@ghost
Copy link

ghost commented Oct 16, 2020

And, is there any way maintainers can make changes instead of asking contributors to make nitpicky changes each time?

@ghost ghost merged commit 73c369c into spotDL:next-rel-dev Oct 19, 2020
@ghost
Copy link

ghost commented Oct 19, 2020

Amazing job, Mr. Shafiq. Lots of people waiting for this change.

This pull request was closed.
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

Successfully merging this pull request may close these issues.

2 participants