I can say that code wise, 'buying girl scout
cookies' and giving Cream a special hug 15 times will definitely stop the music forcing a reload if you want to have music (as they start playing porn groove music), and I
think that's it, but I can't guarantee it.
If you want to be really fancy, you can do:
Code:
$ length_of_music_in_seconds=240 # the length of your custom audio track in seconds
$ starttime = renpy.random.randint(0, length_of_music_in_seconds) # this'll choose a random starting point
play music f"<from {starttime}>audio/music/main_theme.mp3" loop # this starts the music from that point
in vars.rpy to get a different starting point of the music any time you save / load the game (loading the same save should always give the same starting point though, if the document on renpy.random is correct)
Ending the day doesn't restart the music btw, the new day sound is just a sound effect not music, so it doesn't stop the main music.