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

feature: --ignore-album #1934 can only accept one keyword for albums to ignore #2009

Closed
mckayc opened this issue Jan 12, 2024 · 5 comments · Fixed by #2031
Closed

feature: --ignore-album #1934 can only accept one keyword for albums to ignore #2009

mckayc opened this issue Jan 12, 2024 · 5 comments · Fixed by #2031
Labels
Bug Unexpected problem or unintended behavior that needs to be fixed Stale Issue with no activity for the last 30 days

Comments

@mckayc
Copy link

mckayc commented Jan 12, 2024

System OS

Windows

Python Version

3.11 (CPython)

Install Source

pip / PyPi

Install version / commit hash

4.2.4

Expected Behavior vs Actual Behavior

Expected behavior:
When you use the flag --ignore-albums, you should be able to ignore albums with several different keywords.

For example, if you want to download all the albums of the band "Sweet" but want to exclude albums that are mixes, sessions, or rare, you could run

spotdl https://open.spotify.com/artist/3JaAGmSTpJK35DqWrDUzBz --ignore-albums "mixes" or "sessions" or "rare" --output '{artist}/({year}) {album}/{artist} - {album} - {track-number} - {title}'

And this should exclude downloading any album with any of the keywords.

Actual behavior:

When doing the command with multiple keywords, albums are not ignored as they should be.

I have also tried it like:

spotdl https://open.spotify.com/artist/3JaAGmSTpJK35DqWrDUzBz --ignore-albums "mixes, sessions, rare" --output '{artist}/({year}) {album}/{artist} - {album} - {track-number} - {title}'

Either way I run the command, it will still download albums that have any of the keywords in the title.

Steps to reproduce - Ensure to include actual links!

  1. Run the following command:
    spotdl https://open.spotify.com/artist/3JaAGmSTpJK35DqWrDUzBz --ignore-albums "mixes" --output '{artist}/({year}) {album}/{artist} - {album} - {track-number} - {title}'
  2. Notice that the album "Give Us A Wink (Alt. Mixes & Demos)" is NOT downloaded.
  3. Now run the following command:
    spotdl https://open.spotify.com/artist/3JaAGmSTpJK35DqWrDUzBz --ignore-albums "mixes" or "sessions" --output '{artist}/({year}) {album}/{artist} - {album} - {track-number} - {title}'
  4. Notice that all albums are being downloaded including albums with "mixes" or "sessions" in the title.

Traceback

Processing query: https://open.spotify.com/artist/3JaAGmSTpJK35DqWrDUzBz
Found 347 songs in Sweet (Artist)
Skipped 0 songs (Ignored albums)

Other details

It is possible that this works as intended and only one keyword is allowed. I would think however that you should be able to specify multiple keywords.

I have tried many different syntaxes, and none of them worked. Maybe this is working and I just don't know how to write the keywords. If this is the case, a simple update in documentation would likely suffice.

Thanks!

@mckayc mckayc added the Bug Unexpected problem or unintended behavior that needs to be fixed label Jan 12, 2024
@bharat-nair
Copy link
Contributor

bharat-nair commented Jan 20, 2024

You should be able to pass multiple keywords like so: --ignore-albums "mixes" "sessions" "rare" in different quotes.
However, you're right, there seems to be a bug in the keyword check.

@mckayc
Copy link
Author

mckayc commented Jan 20, 2024

@bharat-nair thanks for writing. I thought I had checked the quote method before like you showed, I checked again just now to verify if it is still buggy. It is. One other thing I noticed is that it either tries to repeatedly download the same songs over and over again or it somehow gets stuck in some sort of loop because when I try downloading ignoring keywords it never fully downloads.

Here is a line you can use to test:
spotdl $URL --ignore-albums "live" "greatest" "in concert" "retrospective" "demo" "mixes" "sessions" "demos" "anniversary" "rare" "hits" "rehearsals" "complete" "love songs" "gold" "anthology" "box set" "singles" "best" --skip-explicit --output '{artist}/({year}) {album}/{artist} - {album} - {track-number} - {title}'

Replace $URL with either an artist URL or an album URL.

If you use an artist URL (example: https://open.spotify.com/artist/3JaAGmSTpJK35DqWrDUzBz ), it does not ignore all the keywords.
If you use an album URL with one of the ignored keywords (example: https://open.spotify.com/album/62aBpOfBSGG0H7eBbiyB5A ), it does not ignore the album. This also seems to go into the weird loop where it tries downloading over and over again. This might be the easiest way to test things out.

Thanks!

@bharat-nair
Copy link
Contributor

So earlier if you had albums: [A, B, C, D] and keywords [B, D], for B the check would compare B-B exclusive of B-D, which ended up adding B to the list of songs. #2014 should fix this, I've tested it with the command you have provided, thanks for that!

@mckayc
Copy link
Author

mckayc commented Jan 21, 2024

@bharat-nair Cool beans. Thanks so much for the fix. I look forward to trying it out!

@xnetcat xnetcat linked a pull request Feb 23, 2024 that will close this issue
Copy link

stale bot commented Mar 17, 2024

This issue has been automatically marked stale because there hasn't been any activity for the last 30 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Unexpected problem or unintended behavior that needs to be fixed Stale Issue with no activity for the last 30 days
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants