Skip to content

Commit

Permalink
remove discord and fix autoreload
Browse files Browse the repository at this point in the history
  • Loading branch information
Bronya-Rand committed Feb 14, 2023
1 parent 5bc7d13 commit a2ccd58
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions game/audio_code.rpy
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ init python:
renpy.store.build.classify("game/track/**", "track all")

# Creation of Music Room and Code Setup
ostVersion = 3.2
ostVersion = 3.21
renpy.audio.music.register_channel("music_player", mixer="music_player_mixer", loop=False)

if renpy.windows:
Expand Down Expand Up @@ -221,13 +221,6 @@ init python:
self.randomSong = False
self.loopSong = False

def update_discord(self):
if not enable_discord_rpc:
return

RPC.update_details("Listening to " + ost_info.get_title())
RPC.update_state("Artist: " + ost_info.get_artist())

def get_loop_status(self):
return self.loopSong

Expand Down Expand Up @@ -304,7 +297,6 @@ init python:
renpy.notify("Now Playing: " + ost_info.get_title() + " - " + ost_info.get_artist())

renpy.audio.music.play(ost_info.get_path(), self.channel, self.loopSong)
self.update_discord()

def random_track(self):
unique = 1
Expand All @@ -318,7 +310,6 @@ init python:
renpy.notify("Now Playing: " + ost_info.get_title() + " - " + ost_info.get_artist())

renpy.audio.music.play(ost_info.get_path(), self.channel, self.loopSong)
self.update_discord()

def mute_player(self):
logging.info("Muting the audio player.")
Expand Down Expand Up @@ -652,12 +643,14 @@ init python:
self.logdir = os.path.join(config.basedir, "ost_log.txt")

if enable_logging:
if renpy.get_autoreload():
self.ost_log_stop()

if os.path.exists(self.logdir):
os.remove(self.logdir)

self.ost_log_start()

logging.info("Making the \"track\" folder in " + gamedir + " if it's not present.")
try: os.mkdir(os.path.join(gamedir, "track"))
except: pass
Expand All @@ -668,7 +661,7 @@ init python:
logging.info("Clearing the covers folder of cover art.")
for x in os.listdir(os.path.join(gamedir, "track", "covers")):
os.remove(os.path.join(gamedir, "track", "covers", x))

ost_song_assign.scan_song()

def get_music_channel_info(self):
Expand Down

0 comments on commit a2ccd58

Please sign in to comment.