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

Random changes and fixes. #1897

Merged
merged 8 commits into from
Sep 1, 2023
Merged

Random changes and fixes. #1897

merged 8 commits into from
Sep 1, 2023

Conversation

Piripe
Copy link
Contributor

@Piripe Piripe commented Aug 25, 2023

Title

Random changes and fixes.

Description

I found some small tweaks and fixes during my time using spotDL, there is it.

Related Issue

My changes are like 2 lines of code per change (And I already written them), so I will list them here because it's a big waste a time to write all the issues to describe all of these bugs or tweaks.

  1. Support for manual Bandcamp and Soundcloud download. (Using like manual Youtube download in the format MusicURL|SpotifyURL)
  2. Fix crash when filtering results with the --dont-filter-results argument when a provider has 0 result.
  3. Fixed a crash with the cache.
  4. Fixed matching error when downloading an album caused by track duration.
  5. Removed video filter in the Youtube Music provider, Youtube provider will do almost the same. Video search is rather uncertain (more so than Soundcloud, Bandcamp or Slider.kz), and removing this ensures a good result from Youtube Music.
    • I think I have to explain this last change, and why I did that. Because it can feels strange at first look. Imagine you are downloading a music that is on Soundcloud in good quality but on Youtube there is a clip with an intro, and you want the version of Soundcloud without changing the downloader settings (Maybe the music is in a big playlist and you can't do it for each music) This change allows you to order Youtube Music in first because it return only good results (With this change), Soundcloud in second and Youtube in third to still download the music if it's only available as a video clip but prioritize better providers.
    • If I'm wrong with this change, let me know. But I think the video search on YT Music and YT are almost the same in the case of music search.

Motivation and Context

I used spotDL for a while now and I found some tweaks to improve the experience with it.

How Has This Been Tested?

I tested my changes with Python 3.11 and using only the download and sync actions and pytest.
I have no idea if it breaks other parts of the code but probably not. (Because I'm using this fork for like 5 months now and updated it with each new version of spotDL because I was lazy to make a PR)

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
    • Changes 2, 3, 4
  • New feature (non-breaking change which adds functionality)
    • Change 1
  • Breaking change (fix or feature that would cause existing functionality to change)
    • Change 5

Checklist

  • My code follows the code style of this project
  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have read the CONTRIBUTING document
  • I have read the CORE VALUES document
  • I have added tests to cover my changes
  • All new and existing tests passed (*)

(*) Few tests failed, but it's not related to this changes. And few matching tests related to the change 5.

Copy link
Member

@xnetcat xnetcat left a comment

Choose a reason for hiding this comment

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

looks good to me

{"filter": "songs", "ignore_spelling": True, "limit": 50},
{"filter": "videos", "ignore_spelling": True, "limit": 50},
{"filter": "songs", "ignore_spelling": True, "limit": 50}
Copy link
Member

Choose a reason for hiding this comment

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

imo it's best to keep video type results. there's not as much songs as videos and newbie users using spotDL thorough terminal for the first time might get confused as to why their songs are not getting downloader.

more advanced users that don't want this can use --only-verified-results flag

@xnetcat xnetcat merged commit 992d30b into spotDL:dev Sep 1, 2023
@xnetcat xnetcat mentioned this pull request Sep 1, 2023
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.

None yet

2 participants