This release was originally scheduled to be minor release v0.4.2, but so many new features were added along the way that it really deserves a major version number increase. Enough is happening, in fact, that I'm breaking up these release notes by module.
Changelog:
General
- The TMD, Ticket, and Title classes now all offer `get_is_fakesigned()` to check whether the loaded TMD and/or Ticket is fakesigned. For a Title, this checks both the TMD and Ticket and only returns True if they are both fakesigned.
- Content records with content indices that don't match the literal index of the record are now handled correctly on the dumping side. The loading side was already working as expected.
- The TMD, Ticket, and Title classes now all offer `set_title_version()` to correctly set a new version number. For a Title, this sets the version in both the TMD and Ticket.
- `get_common_key()` now falls back on key 0 (the normal common key) instead of raising an exception when an invalid key index is supplied. This fixes handling tickets with strange values set as the key index.
- Fixed a case where a Title ID formatted in a certain way would not be converted properly to an IV during Title Key decryption.
- The footer is now read from/written to the correct portion of a WAD. Y'know, the foot. Where it always should've been.
- The title version can be converted to a friendlier format (vX.X) for supported titles. This mostly only produces useful results for the System Menu, whose values are hard-coded, IOS, and most first-party downloadable channels.
- U8 archives are now all extracted properly, and packing is much closer to official Nintendo-made U8 archives.
New Class: SharedContentMap
- New class for handling the `content.map` file used by the Wii to manage shared content.
- Allows for parsing an existing map, initializing a new one, and adding entries.
- New entries return the shared content ID that was assigned to them when added.
New Class: IOSPatcher
- New class for applying patches to loaded IOS Title objects.
- Currently supported stable patches include: `patch_fakesigning()`, `patch_es_identify()`, `patch_nand_access()`, and `patch_version_downgrading()`. More can be read about these patches in the API documentation, though they are the same as patches done by legacy tools.
- Experimental patch for disabling querying the disc drive, mostly for vWii users without a drive installed. This patch is still a work in progress and may cause unexpected side effects on some setups. This patch is **not** included in `patch_all()`.
New Class: EmuNAND
- New class for creating and managing EmuNANDs.
- Currently only supports installing titles to an EmuNAND and removing installed titles.
- Not currently complete enough to create a fresh, working EmuNAND, but it can safely modify an existing one, and creates enough data that you can install WADs to a blank folder with it and give it to Dolphin and it can fill in the gaps to boot it.
New Class: UidSys
- New class for handling the `uid.sys` file used by the Wii to track all titles ever present on the console.
- Allows for parsing an existing file, initializing a new one, and adding new entries.
- New entries return the UID assigned to them when added.
Content
- Much of the ContentRegion class was rewritten from scratch, providing much more clarity. This is also represented in the improved docstrings and API documentation generated from them.
- The ContentRegion class now entirely relies on the true content indices specified in the content records. This means that getting or setting a certain index may actually be changing a different index than expected, because the content index of the record there differs from the index of the record. This should not matter in most cases.
- Distinctions between `load_content()`/`add_content()`/`set_content()` and their encrypted counterparts are now much clearer.
- Get methods now support skipping the hash checks for decryption. This will print out a warning if the check failed that it is being ignored. This behavior cannot be changed.
Title
- A major bug was fixed where edited content records weren't being copied from the ContentRegion (where they were being edited) to the TMD before dumping a WAD.
- The Title Key will now be properly re-encrypted when setting the Title ID in a Title object.
- Added `get_title_size()` and `get_title_size_blocks()` to get the installed size of the title in bytes and blocks, respectively.
TMD
- A TMD's `access_rights` property is now properly stored as an integer.
- TMDs now offer the `AccessFlags` enum that defines the bits used to determine and set access rights. Current values are `DVD_VIDEO` and `AHB`.
- New method `get_access_right()` that takes a bit to check and returns True/False based on if that bit is enabled or not. Recommended to be used alongside `AccessFlags`.
- Title types and content types are now handled properly. This does not impact `get_title_type()` as it only changed the backend for it and not the return values. For getting the content type, you now must use `get_content_type()` and specify the content index that you want the type of.
There have also likely been many more minor fixes here and there that I have forgotten about. No other API changes should have occurred, beyond the ones explicitly listed above.
Remember, we have API documentation! It's automagically generated from the docstrings, so it's always pretty up to date. You can go check it out [here](https://ninjacheetah.github.io/libWiiPy).
This release is also available [on PyPI](https://pypi.org/project/libWiiPy/0.5.0/).