Lots of handy guys on this group that understand motors, certainly better than me. I am a field mechanic, fixing my tools as I need to to get them back on the job.
It sounds to me to be brushes, or a worn commutator, or both. Check the windings and make sure they are still in good shape, insulated and clean. Try blowing out the motor assembly and motor with another compressor.
If it is brushes, you can fix it easily, if it is the commutator you are toast. Available, but $$$. A bad capacitor would certainly keep it from starting, but >generally< speaking if that was it, it wouldn't start again later as if nothing was wrong. But a bad capacitor wouldn't account for the sparks.
But for $150, you shouldn't have it fixed at all.
I just bought a Bostitch C265 refurb combo that had the following: a six gallon 2 hp pancake compressor, 16 ga. finish nailer, 18 ga. brad nailer, gauges, fittings, hose, brads and a one year warranty on all of it. The cost was $199 to the door, and it was delivered in two days from the day I purchased.
I was looking at new compressors when I found this deal as my favorite little compressor I use all the time for the door/trim installs I do is finally giving up. This is a $129 compressor, and the cost to repair was around $65 in parts. I couldn't see putting that into a compressor that has been on the job for almost 5 years. My experience is that I will fix some part of a machine like this and it then some other 5 year old part will break.
This stuff is getting so cheap, I am thinking that we are going where we all fear, a totally disposable society. If I paid for the parts and had someone fix the compressor, they charge a minumum $65 bench fee. They would put the new parts on, but then it would be $130...
Robert