eviabs / downtify-premium

Downtify is an open source Spofity downloader which makes it possible to download all your favourite songs and/or playlists directly from spotify. A Spotify Premium account is required.
GNU General Public License v3.0
368 stars 37 forks source link

Object reference not set to an instance of an object #30

Open morrisseydylan opened 3 years ago

morrisseydylan commented 3 years ago

I cloned the repo, entered my info in the config file, then compiled the program. It ran normally, but upon inputting a Spotify track link into the textbox and pressing enter, I was greeted with a System.NullReferenceException: Screenshot_1

spfy13 commented 3 years ago

Hey I've had this issue too but here's how I fixed it. You select the songs you want from Spotify and (USE CONTROL C to) copy and you paste (WITH CONTROL V) them in notepad. Then you control c them from notepad and control v them into downtify. For some reason this works. You also get this error if you copy an entire playlist that has like 1000 songs. I stick to downloading 180 at a time and just downloading my library bit by bit.

You may also face a "path too long" error which means a song's name too long and won't download. This is because the app finds the download folder which uses up characters in a process and if your song's name is very long or has a lot of artists the process runs out of space. To fix this put the whole downtify at the beginning of your C: drive.

image

^This location.^

image

This makes it one of the first things on your drive so it doesn't use as many characters and your song can download. Hope this helps!

morrisseydylan commented 3 years ago

Thank you for the quick and detailed response. Using Ctrl+C in Spotify worked.

For anyone else reading, using Ctrl+C with a song highlighted gives you a link that looks like this:

https://open.spotify.com/track/3MqhYg42XllINiv0m12mCa

While right clicking on a song and clicking Share > Copy Song Link (which is what I did previously) gives you this:

https://open.spotify.com/track/3MqhYg42XllINiv0m12mCa?si=a67d6f79fed94d3e

The former works; the latter throws an exception.

artofsound commented 3 years ago

https://open.spotify.com/track/3MqhYg42XllINiv0m12mCa https://open.spotify.com/track/3MqhYg42XllINiv0m12mCa?si=a67d6f79fed94d3e

Yeah, it's because of the "?si=a67d6f79fed94d3e" in the URL. You can easily modify the code to split it at the question mark, so it works with it as well.

morrisseydylan commented 3 years ago

Yes.

eviabs commented 2 years ago

Feel free to open PRs :) I might get to this in the future.

lovemonkeyz commented 2 years ago

https://github.com/eviabs/downtify-premium/pull/33

This is fixed :)