README
@badisi/xbw
NodeJS module utility which provides helpful functions to read and/or verify xbox 360 backup iso files
Installation
xbw
is pre-built for node and electron.
$ npm install @badisi/xbw --save
$ yarn add @badisi/xbw
Usage
const { verifyWithAbgx360, getIsosInfo } = require('@badisi/xbw');
Methods
getIsosInfo(isoPaths: string[]): IsoInfo[]
Extract information from backup iso files
Arguments
isoPaths
- An array of absolute paths to iso files.
Return
An array of IsoInfo
objects that have the following properties:
file: string
- A string representing the path to the iso backup.titleId: string
- A string representing the title id.mediaId: string
- A string representing the media id.discCount: number
- An integer representing the number of disc.discNumber: number
- An integer representing the disc number.regions: Region[]
- An array representing the regions.isValid: boolean
- A boolean representing whether the file is a valid iso backup or not.
Example
const { getIsosInfo } = require('@badisi/xbw');
const isosInfo = getIsosInfo([
'/Users/User/backups/Game.iso',
'/test.iso'
]);
console.log(isosInfo);
// => [{
// file: '/Users/User/backups/Game.iso',
// titleId: '12345678',
// mediaId: 'A1B2C3D4',
// discCount: 2,
// discNumber: 1,
// regions: [
// 'PAL'
// 'NTSC_U'
// ],
// isValid: true
// }, {
// file: '/test.iso',
// isValid: false
// }]
verifyWithAbgx360(isoPaths: string[], options?: AbgxOptions, onProgress?: (progress: string) => void): Promise<AbgxFile[]>
Verify backup iso files integrity against abgx360
Arguments
isoPaths
- An array of absolute paths to iso files.options
- (Optional) An object of abgx360 options.onProgress
- (Optional) A callback which is called for every processed output.
Return
An array of AbgxFile
objects that have the following properties:
file: string
- A string representing the path to the iso backup.status: AbgxStatus
- Possible values are: VERIFIED = 0, ERROR = -1, DATA_ERROR = -2 and STEALTH_ERROR = -3.
Example
const { verifyWithAbgx360 } = require('@badisi/xbw');
const files = [
'/Users/User/backups/Game.iso',
'/test.iso'
];
const abgxOptions = {
corrupt: true,
af3: true,
patchgarbage: true,
patchitanyway: true,
html: true
};
verifiedWithAbgx360(files, options, (progress) => console.log(progress))
.then(results => console.log(results))
.catch(error => console.error(error));
// => [{
// file: '/Users/User/backups/Game.iso',
// status: 0
// }, {
// file: '/test.iso',
// status: -1
// }]
Credit
License
Copyright © 2013-2021 Badisi
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to use, copy, publish and/or distribute the Software, but with restriction including the rights to modify, merge, sublicense and/or sell copies of the Software, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.