Skip to content

Commit

Permalink
Fix bug causing songs with ogg files which are not all lowercase.
Browse files Browse the repository at this point in the history
  • Loading branch information
mdsitton committed Dec 31, 2015
1 parent ac233fa commit a5bb9c1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fofix/game/Song.py
Expand Up @@ -2249,7 +2249,7 @@ def unpause(self):
def setInstrumentVolume(self, volume, part):
# This function is called way to much during sustained notes.
# IMO it should be called only if the note is hit or missed not
# paractically every game loop...
# practically every game loop...
if not self.singleTrackSong:
for trackId in TRACK_ID_NAME_MAP.keys():
if part == parts[trackId]:
Expand Down Expand Up @@ -3194,12 +3194,12 @@ def loadSong(engine, name, library = DEFAULT_LIBRARY, playbackOnly = False, note
songFiles[instName] = []
songFiles[instName].append(engine.resource.fileName(library, name, f))

if 'song.ogg' not in songOggFiles:
if 'song' not in songFiles:
songFiles['song'] = songFiles['guitar']
del songFiles['guitar']

# check to see if the guitar and song ogg's are the same file, if so use only one.
if 'song.ogg' in songOggFiles and 'guitar.ogg' in songOggFiles:
if 'song' in songFiles and 'guitar' in songFiles:

with open(songFiles['song'][0], 'rb') as f:
songHash = hashlib.sha1(f.read()).hexdigest()
Expand Down

0 comments on commit a5bb9c1

Please sign in to comment.