NinjaCheetah/libWiiPy

Feat: Read contents list from TMD and generate a list of ContentRecord objects

Closed this issue · 1 comments

The num_contents and content_record variables in the TMD class currently go unused because the content info in the TMD isn't being read. To be able to properly handle WADs in any capacity, the content records contained in the TMD need to be read, and a list of these records needs to be generated from them. This will allow easy reading of the Content ID, Content Type, Content Size, and Content Hash of each content belonging to a title.

See the documentation at: https://wiibrew.org/wiki/Title_metadata for more information.

A data class for the content records does already exist and should be ready for use?

rvtr commented

Thanks for the edit on tmd.py. Just making one small change to the error for get_content_record(). Currently looks a bit weird.

IndexError: Invalid content record! TMD lists '9' contents but index was '9'!