downtify-premium icon indicating copy to clipboard operation
downtify-premium copied to clipboard

Object reference not set to an instance of an object

Open morrisseydylan opened this issue 4 years ago • 6 comments

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

morrisseydylan avatar Jul 26 '21 08:07 morrisseydylan

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!

spfy13 avatar Jul 26 '21 09:07 spfy13

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.

morrisseydylan avatar Jul 26 '21 13:07 morrisseydylan

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.

artofsound avatar Jul 26 '21 13:07 artofsound

Yes.

morrisseydylan avatar Jul 26 '21 16:07 morrisseydylan

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

eviabs avatar Oct 06 '21 21:10 eviabs

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

This is fixed :)

lovemonkeyz avatar Jan 17 '22 07:01 lovemonkeyz