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

Fix For #1018. Download error coz of Copyright issue #1022

Merged
2 commits merged into from Dec 18, 2020
Merged

Fix For #1018. Download error coz of Copyright issue #1022

2 commits merged into from Dec 18, 2020

Conversation

dheerain
Copy link
Contributor

@dheerain dheerain commented Dec 8, 2020

The Below Fix is for the Copyright songs download issue.
#1018
Upon investigation I found out that out of the full playlist there are only a few songs that got downloaded. and rest failed . The issue seems to be with the Copyright items. Few links can not be downloaded directly. Updated the code to get first 10 best match links from youtube and start parsing till one runs, Upon doing this the success rate increased to around 90%.

@ghost
Copy link

ghost commented Dec 14, 2020

Sorry for the delay. My lap was under repair. I'll review this by evening.

Copy link
Contributor

@phcreery phcreery left a comment

Choose a reason for hiding this comment

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

seems like a good fix to me

@ghost ghost merged commit e49792a into spotDL:master Dec 18, 2020
@Kavan72
Copy link

Kavan72 commented Dec 18, 2020

@phcreery have you check, he is importing ProgressRootProcess from spotdl.download.progressHandlers but on this file i cant find this class

@phcreery
Copy link
Contributor

@Kavan72, you are correct, this merge was from an outdated commit of spotdl. (Before asyncio).

The main changes I reviewed are in the function search_and_get_best_match() of spotdl/search/provider.py (463-495)

and also download_song() shown below

    # download Audio from YouTube
    if progressTracker:
        youtubeHandler = YouTube(
            url=songObj.get_youtube_link(),
            on_progress_callback=progressTracker.pytube_progress_hook
        )
    else:
        youtubeHandler = YouTube(songObj.get_youtube_link())
   # download Audio from YouTube
    YouTubeLinks = songObj.get_youtube_link(),
    for link in YouTubeLinks[0]:
        if displayManager:
            youtubeHandler = YouTube(
                url                  = link,
                on_progress_callback = displayManager.pytube_progress_hook
            )
        else:
            youtubeHandler = YouTube(link)

I apologize, I should have been more explicit. I do not think the merge is ready. I think the fix is a good idea though. @dheerain could you apply this to the latest commit of spotDL and create a new pull request?

phcreery added a commit that referenced this pull request Dec 22, 2020
@dheerain
Copy link
Contributor Author

equest?

Thank you for pointing that out. I will work on that and raise a new Pull Request

@Silverarmor
Copy link
Member

This PR has been reverted in #1053, since it removed asyncio.

@Silverarmor Silverarmor added the Bug Fix PRs that fix bugs label Jan 8, 2021
@phcreery
Copy link
Contributor

@dheerain could you please recreate this improvement on an up-to-date fork of the dev branch?

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Fix PRs that fix bugs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants