On a side note, would this situation (an M class and a large gas giant) cause a nova? Or is that only white dwarves and binary stellar partners?
Unlikely, in real life it'd be highly unlikely that those two objects would ever form that close, and were a planet that size to fall into such a position, it'd probably take a few millenia, during which time the star (likely being the more massive) would have blasted a lot of the planets atmosphere away with its solar wind, and would have stripped a lot of the rest off through its own gravity. Given the time scale, it'd be unlikely to destablise the star, and there wouldnt be a significant change to the chemical make up of the star, as they'd most likely have developed from the same cloud of gas and debris with roughly the same chemical composition anyway.
If, on the other hand, that was a rogue gas giant that had been ejected from its own system and was in the process of interacting with another, all bets are off, and at the very least it would probably catastrophically destabilise the system. Potentially the star could capture the planet, and probably devour a great deal of it before it was able to enter a new eccentric orbit, most likely bouncing everything else in the system around a lot in the process. At the right mass and velocity it could drag enough of the star with it to trigger some kind of explosion, possibly not a full supernova, but enough to decimate the system..
Would be interesting to model, for sure, and I might give that a go when I have more free time, but I wouldnt want to be in the vicinity of any system where it happened for real lol.
Sorry for the wall of text... it's the astrophysicist in me >.<