mirror of
https://github.com/Majjcom/ncmDumper.git
synced 2026-09-15 13:07:54 +08:00
1.2.0
- auto set max thread count
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
from multiprocessing import cpu_count
|
||||||
import threading
|
import threading
|
||||||
import binascii
|
import binascii
|
||||||
import struct
|
import struct
|
||||||
@@ -134,13 +135,14 @@ def main():
|
|||||||
process = [0, 0, 0]
|
process = [0, 0, 0]
|
||||||
if not os.path.exists('./unlock'):
|
if not os.path.exists('./unlock'):
|
||||||
os.mkdir('./unlock')
|
os.mkdir('./unlock')
|
||||||
|
maxCount = cpu_count()
|
||||||
while True:
|
while True:
|
||||||
count = 0
|
count = 0
|
||||||
tmp = None
|
tmp = None
|
||||||
for key in musicFiles:
|
for key in musicFiles:
|
||||||
if musicFiles[key] == 1:
|
if musicFiles[key] == 1:
|
||||||
count += 1
|
count += 1
|
||||||
if count < 5 and musicFiles[key] == 0:
|
if count < maxCount and musicFiles[key] == 0:
|
||||||
upperPrint('解密中...\t{}'.format(key))
|
upperPrint('解密中...\t{}'.format(key))
|
||||||
musicFiles[key] = 1
|
musicFiles[key] = 1
|
||||||
Dumper(key, musicFiles).start()
|
Dumper(key, musicFiles).start()
|
||||||
|
|||||||
Reference in New Issue
Block a user