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 downloading artist songs. #904

Merged
5 commits merged into from
Oct 25, 2020
Merged

Added support for downloading artist songs. #904

5 commits merged into from
Oct 25, 2020

Conversation

s1as3r
Copy link
Contributor

@s1as3r s1as3r commented Oct 19, 2020

Does what #874 asks for.

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.

Good code this time around.

  1. This code won't get all albums, I'm not sure if that was your intent or that just happened.
  2. Poor encapsulation.

I'm ready to make the changes if your ok with that.

spotdl/__main__.py Outdated Show resolved Hide resolved
spotdl/search/utils.py Outdated Show resolved Hide resolved
@s1as3r
Copy link
Contributor Author

s1as3r commented Oct 20, 2020

It's ok if you make changes.

@ghost
Copy link

ghost commented Oct 20, 2020

Cool

@s1as3r
Copy link
Contributor Author

s1as3r commented Oct 20, 2020

@Mikhail-Zex I Have some free time at my hands. Don't worry I'll work on this.

s1as3r and others added 3 commits October 20, 2020 22:32
spotdl was appending albumTracks (a list) to the artistTracks which is supposed to be a list of SongObjs and not a List of Lists.
@ghost ghost mentioned this pull request Oct 21, 2020
@ghost
Copy link

ghost commented Oct 23, 2020

Is this ready for some testing?

@s1as3r
Copy link
Contributor Author

s1as3r commented Oct 23, 2020

Is this ready for some testing?

Yup. Go Ahead.
Hope it works fine.

@ghost
Copy link

ghost commented Oct 25, 2020

It works, but takes wayyy too long to get artist tracks. The whole track getting business takes way too long anyways. We could parallelize it. You can consider this PR completed. I'll make a change or two here and there once I'm done with the redesigned downloads interface.

@ghost ghost merged commit 095c260 into spotDL:next-rel-dev Oct 25, 2020
ghost pushed a commit that referenced this pull request Oct 25, 2020
ghost pushed a commit that referenced this pull request Oct 25, 2020
@ghost
Copy link

ghost commented Oct 25, 2020

One other thing. It download's way too many extra songs. Every single album an artist is invoved in is added. The artist might have only contributed one song. You've got to add an extra layer of filtering.

I ran python .\dev utils\spotdlTF.py on the tracking file you get after running spotdl spotify:artist:2bdcBjvuI9worc472GbeU0

These are the results:

  2   Samuel Kim, Blake Matthew                                      Family
  3   Samuel Kim, Blake Matthew                                      Dream
  4   Samuel Kim, Blake Matthew                                      Broken
  5   Samuel Kim, Blake Matthew                                      The Past, Pt. 1
  6   Samuel Kim, Blake Matthew                                      The Past, Pt. 2
  7   Samuel Kim, Blake Matthew                                      My Daughter
  8   Samuel Kim, Blake Matthew                                      Bride Kidnapping
  9   Samuel Kim, Blake Matthew                                      Shame and Honor
 10   Samuel Kim, Blake Matthew                                      Suyun
 11   Samuel Kim, Blake Matthew                                      Storage
 12   Samuel Kim, Blake Matthew                                      Searching
 13   Samuel Kim, Blake Matthew                                      The Plan
 14   Samuel Kim, Blake Matthew                                      You Are Still My Sister
 15   Samuel Kim, Blake Matthew                                      My Precious Child, My Precious Gift
 16   Samuel Kim, Blake Matthew                                      The Return
 17   Samuel Kim, Blake Matthew                                      After the Rain
 18   Samuel Kim, Blake Matthew                                      Hope Shines Eternal
 19   Samuel Kim                                                     Jezoar
 20   Samuel Kim                                                     Water of Life
 21   Samuel Kim                                                     Kimbilio
 22   Samuel Kim                                                     Light Unfolding
 23   Samuel Kim                                                     Merina
 24   Samuel Kim                                                     Beautiful Name
 25   Samuel Kim                                                     Elohim
 26   Samuel Kim                                                     Father's Heart
 27   Samuel Kim                                                     Emperor Palpatine's Theme (Epic Medieval Style)
 28   Samuel Kim                                                     Battle of the Heroes (Medieval Style)
 29   Samuel Kim                                                     The Mandalorian (Medieval Style)
 30   Samuel Kim                                                     The Force Theme (Medieval Style)
 31   Samuel Kim                                                     Across the Stars (Medieval Style)
 32   Samuel Kim, Mik                                             One Summer's Day - Lofi Version
 33   Samuel Kim, Mik                                             A Town With an Ocean View - Lofi Version       
 34   Samuel Kim, Mik                                             The Wind Forest - Lofi Version
 35   Samuel Kim                                                     Oogway Ascends - Epic Version
 36   Samuel Kim                                                     Kai's Theme & Agni Kai
 37   Samuel Kim                                                     How to Train Your Dragon Theme
 38   Samuel Kim                                                     Forbidden Friendship - Cinematic Version       
 39   Samuel Kim                                                     Halo Theme - Epic Version
 40   Samuel Kim                                                     Duel of the Fates (Medieval Style)
 41   Samuel Kim                                                     Imperial March (Medieval Style)
 42   Samuel Kim                                                     General Grievous Theme (Medieval Style)        
 43   Samuel Kim                                                     The Clones Theme (Epic Medieval Style)
 44   Samuel Kim                                                     Darth Revan Theme (Epic Medieval Style)        
 45   Samuel Kim                                                     Jedi Temple March (Epic Medieval Style)        
 46   Samuel Kim                                                     Hoist the Colours - Epic Version
 47   Samuel Kim                                                     Up Is Down & Battle of the Heroes
 48   Samuel Kim                                                     One Day & the Force Theme
 49   Samuel Kim                                                     Marry Me & Across the Stars
 50   Samuel Kim                                                     Davy Jones & Imperial March
 51   Samuel Kim                                                     The Kraken & Duel of the Fates
 52   Samuel Kim, Mik                                                Avatar's Love - Lofi Version
 53   Samuel Kim, Mik                                                The Legend of Korra Theme
 54   Samuel Kim, Mik                                                Leaves from the Vine - Lofi Version
 55   Samuel Kim                                                     Leaves from the Vine
 56   Samuel Kim                                                     Avatar's Love
 57   Samuel Kim                                                     Service and Sacrifice
 58   Samuel Kim, Black Gryph0n                                      When You Believe (from The Prince of Egypt)    
 59   Samuel Kim                                                     Burying The Dead (It's Over Now)
 60   Samuel Kim                                                     The Clones' Sacrifice
 61   Samuel Kim                                                     I'm So Sorry (Anakin's Betrayal)
 62   Samuel Kim                                                     Order 66 Theme - Epic Version
 63   Samuel Kim                                                     Avatar: The Last Airbender Theme
 64   Samuel Kim                                                     The Last Agni Kai
 65   Samuel Kim                                                     Agni Kai - Epic Version
 66   Samuel Kim                                                     Ezio's Family - Valhalla Version
 67   Samuel Kim                                                     The Throne Room and Main Theme
 68   Samuel Kim                                                     The Asteroid Field
 69   Samuel Kim                                                     Boba Fett Epic Theme
 70   Samuel Kim                                                     Separatist Droid Army March
 71   Samuel Kim, Black Gryph0n                                      The Plagues
 72   Samuel Kim                                                     Battle Over Coruscant
 73   Samuel Kim                                                     Victory Celebration
 74   Samuel Kim                                                     A Jedi's Fury
 75   Samuel Kim                                                     The Clone Wars Suite
 76   Samuel Kim                                                     The Dark Side March
 77   Samuel Kim                                                     Ahsoka Tano
 78   Samuel Kim                                                     Darkness Within
 79   Samuel Kim, Sorah                                              No Time to Die
 80   Samuel Kim                                                     Darth Revan
 81   Samuel Kim                                                     General Grievous
 82   Samuel Kim                                                     Starkiller
 83   Samuel Kim                                                     Republic Commando (Vode An)
 84   Samuel Kim                                                     Jedi: Fallen Order Main Theme
 85   Samuel Kim, Black Gryph0n                                      I'll Make a Man Out of You
 86   Samuel Kim                                                     Reflection - Epic Version
 87   Samuel Kim, Black Gryph0n                                      The Song of the White Wolf
 88   Samuel Kim, Black Gryph0n                                      Toss a Coin to Your Witcher - Epic Version     
 89   Samuel Kim                                                     The Mandalorian
 90   Samuel Kim                                                     The Mandalorian & Rocky Theme
 91   Samuel Kim, Black Gryph0n                                      Toss a Coin to Your Witcher
 92   Samuel Kim                                                     Duel of the Fates - Epic Version
 93   Samuel Kim                                                     Battle of the Heroes & Duel of the Fates       
 94   Samuel Kim                                                     Emperor Palpatine's Theme
 95   Samuel Kim                                                     Imperial March
 96   Samuel Kim                                                     Rey's Theme
 97   Samuel Kim                                                     The Force Theme
 98   Samuel Kim                                                     Across the Stars (Love Theme)
 99   Samuel Kim                                                     Duel of the Fates
100   Samuel Kim                                                     Star Wars (Epic Main Theme)
101   Samuel Kim                                                     The Rise of Skywalker Theme - Epic Version     
102   Dvbber Dvn, Someone Else, Samuel Kim                           Toss a Coin To Your Witcher
103   Marin Hoxha, CryJaxx, Kynez, jfarr                             As I Am
104   Coopex, EBEN, Sarah De Warren                                  Dance Monkey
105   Sarah De Warren, Biometrix, Marcus McCoan                      HARLEY FVCKING QUINN
106   Jordan Schor, Marvin Divine                                    Want It All
107   Hopex                                                          Home
108   Vinsmoker, Benja                                               Haunted
109   Paul Garzon                                                    Survivors
110   DG812                                                          In Your Eyes
111   ARHY                                                           Orbit
112   BRAN, Sdms                                                     Prisoner
113   Embro                                                          Through
114   Paul Garzon                                                    Vellichor
115   2nd Life, Sdms                                                 Redemption
116   Ericovich                                                      On My Way
117   Raven Link, Vin Bogart                                         Bleeding
118   Edwince, Svniivan, Mitchell Martin                             Euphoria
119   Yusuf Alev                                                     Yoros
120   Jurgaz, QV!N                                                   Pure
121   JackEL, Skrapbeats                                             Destiny
122   Holly, Axol, The Tech Thieves                                  I Need You
123   CryJaxx                                                        Ponder
124   Onur Ormen, Calli Boom                                         Legacy
125   Romen Jewels, Cyanne                                           Comedown (Fraze Remix)
126   Axile, Kaine                                                   Anymore
127   Samuel Kim                                                     Crashsite
128   Samuel Kim                                                     I Have a Bad Feeling About This
129   Samuel Kim                                                     Plans
130   Samuel Kim                                                     Perspective
131   Samuel Kim                                                     Firestorm
132   Samuel Kim                                                     Aftermath
133   Samuel Kim                                                     True Colors
134   Buffalo Jones                                                  Into the Coals

Even though most of the songs involve Samuel Kim, close to 15% (~23 songs) don't involve him at all. Thats all excess. Ive reverted this PR (sorry, I was in such a hurry to get it merged because I kept you waiting, my bad) could you make this last change? Everything else works just fine. I'm up to making the changes too but it'd get delayed a bit, still working on redesigning the downloads interface.

@ghost
Copy link

ghost commented Oct 25, 2020

@s1as3r

@s1as3r
Copy link
Contributor Author

s1as3r commented Oct 26, 2020

Oh, I wasn't able to do much testing (because of 2G 😢) and I'm kinda busy with exams and stuff. I'll see what I can do.

@s1as3r
Copy link
Contributor Author

s1as3r commented Oct 26, 2020

Could you please check this definition of the get_artist_tracks function and see if it works.
This will add only those albums to the albumTracks list whose primary artist is the provided artist.

@ghost
Copy link

ghost commented Oct 26, 2020

Oh, I wasn't able to do much testing (because of 2G 😢) and I'm kinda busy with exams and stuff. I'll see what I can do.

That's ok. I thought the internet was straightened out in kadhmir

@ghost
Copy link

ghost commented Oct 26, 2020

Could you please check this definition of the get_artist_tracks function and see if it works.
This will add only those albums to the albumTracks list whose primary artist is the provided artist.

This will lose out on collaborative albums with songs on which the artist to be downloaded is the primary artist.

You'd actually have to get all album tracks and filter out the ones we're don't need

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.

1 participant