diff --git a/osuRepy/replay.py b/osuRepy/replay.py index c786e45..f57d835 100644 --- a/osuRepy/replay.py +++ b/osuRepy/replay.py @@ -7,6 +7,7 @@ from .helpers import osuMods from .helpers import osuRanks from .helpers import typeSerializer +from os.path import isfile from hashlib import md5 as _md5 def md5(str): @@ -80,6 +81,7 @@ class Replay: def set_mods(self, mods): if mods < 0 or mods > (1 << 30) - 1: raise Exception("Mods are out of range") + self.mods = mods # -------------------------------------------------------------------------- # Update variables --------------------------------------------------------- diff --git a/test.py b/test.py index d194c76..d5fc10c 100644 --- a/test.py +++ b/test.py @@ -6,8 +6,5 @@ replay.write( ReplayFrame(2, 3, 4, 4) ) replay.score_300s = 20 replay.timestamp = 635592412124124124 # Wed Feb 11 2015 09:03:52 GMT+0100 (Central European Standard Time) -replay.timestamp = 635570498982876124 # Invalid timestamp?! -# "2|3|4|4,-12345|0|0|1337," -# ]\0\0 \0\u0018\0\0\0\0\0\0\0\0\u0019\u001f\u0002g�L�_�F���6m��\u0003�,�7��Í -replay.save("test.osr") \ No newline at end of file +replay.save("test.osr")