diff --git a/radio.cs b/radio.cs index fb0647e..6610ecc 100644 --- a/radio.cs +++ b/radio.cs @@ -251,12 +251,17 @@ private void displaySpotifyTrackOnRadio(string artist, string track) } - public string getCurrentStationName() + private string getCurrentStationName() { var name = Function.Call(GTA.Native.Hash.GET_PLAYER_RADIO_STATION_NAME); return name; } + private void disableRadioAds() + { + Function.Call(GTA.Native.Hash.SET_RADIO_STATION_MUSIC_ONLY, radioName, true); + } + private void setEngine(bool status) { if(obtainedSpotifyClient) @@ -603,6 +608,7 @@ private void LoginToSpotInit() { GuaranteeLogin(); initialSpotifyRequests(); + disableRadioAds(); } private async void initialSpotifyRequests()