Initial parallelization attempt
This commit is contained in:
parent
12c05afa57
commit
35e49044f1
10 changed files with 321 additions and 143 deletions
|
|
@ -20,7 +20,29 @@
|
|||
# along with libray. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf8 -*-
|
||||
|
||||
# libray - Libre Blu-Ray PS3 ISO Tool
|
||||
# Copyright © 2018 - 2024 Nichlas Severinsen
|
||||
#
|
||||
# This file is part of libray.
|
||||
#
|
||||
# libray is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# libray is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with libray. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
import argparse
|
||||
import sys
|
||||
|
||||
|
||||
try:
|
||||
|
|
@ -29,8 +51,7 @@ except ImportError:
|
|||
import core
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(
|
||||
description='A Libre (FLOSS) Python application for unencrypting, extracting, repackaging, and encrypting PS3 ISOs')
|
||||
|
||||
|
|
@ -47,6 +68,7 @@ if __name__ == '__main__':
|
|||
optional.add_argument('-r', '--re-encrypt', dest='reencrypt', help='Re-encrypt .iso', action='store_true')
|
||||
optional.add_argument('-c', '--checksum', dest='checksum', help='Allow fallback to CRC32 checksum (disabled by default)', action='store_true')
|
||||
optional.add_argument('-t', '--checksum-timeout', dest='checksum_timeout', type=int, help='How many seconds to wait for CRC32 checksum (default 15)', default=15)
|
||||
optional.add_argument('-p', '--threads', dest='threads', type=int, help='Number of threads for parallel decryption/encryption (default: number of CPU cores)', default=0)
|
||||
optional.add_argument('--info', dest='info', action='store_true', help='Print info about .iso or .ird, then quit.')
|
||||
|
||||
args = parser.parse_args()
|
||||
|
|
@ -61,3 +83,7 @@ if __name__ == '__main__':
|
|||
core.encrypt(args)
|
||||
else:
|
||||
core.decrypt(args)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue