Skip to content

Instantly share code, notes, and snippets.

View cskaryd's full-sized avatar

Chris Skaryd cskaryd

View GitHub Profile
@cskaryd
cskaryd / mbl_reader.py
Last active May 28, 2023 09:13 — forked from lempamo/mbl_reader.py
Fix issues with .NET DateTime Ticks parsing. It appears that all DateTime's expect the 8th byte to be hardcoded to \x08; Making this adjustment allows the byte array to translate into an integer creating a valid .NET Ticks number that correctly converts to a DateTime value which matches the value displayed in MusicBee.
import json
import datetime
global library
def decode_from_7bit(data):
"""
Decode 7-bit encoded int from str data
"""