Skip to content

abraker-osu/osu_db

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

osu_db

About

A helper library for reading the osu!.db and build a list of md5 <-> beatmap path relations. It creates a sqlite data base as ./data/maps.db which contains the following tables:

TABLE maps(md5 TEXT, path TEXT)
TABLE meta(num_maps INT, last_modified REAL)

This is mainly used for determining where to find a beatmap for a given replay, in conjunction with osu_recorder. Do note osu!.db gets updated only when osu! closes, so any new beatmaps added while osu! is open will not be found.

Installing

python -m pip install git+https://github.com/abraker-osu/osu_db.git#egg=osu_db

Add the following to .vscore/settings.json if linting is failing on libraries in venv/src:

"python.analysis.extraPaths": [
    "venv\\src",
]

Use

To start using just create a new MapsDB object, giving it the osu! path:

maps_db = MapsDB('K:/Games/osu!')

On first run it may take a few seconds for it to parse through osu!.db and build the tables. To resolve beatmaps:

map_path = maps_db.get_map_file_name(map_md5, filepath=True)

When filepath is true, it will return the full path to the beatmap, otherwise it will return the name of the beatmap file

To refresh the db with new maps:

maps_db.check_db()

And that's pretty much all there is to it

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors