Fix Ozon
This commit is contained in:
parent
da72c4eda6
commit
3c1db3c36c
@ -842,8 +842,11 @@ QList<Node> ScreenXmlParser::tryToFindPinCode(const QString &pinCode, const QStr
|
|||||||
if (node.text.trimmed() == "Отложить" && node.className == "android.widget.Button") {
|
if (node.text.trimmed() == "Отложить" && node.className == "android.widget.Button") {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
// В Ozon PIN экран определяется по ссылке "Не помню код-пароль"
|
// В Ozon PIN экран определяется по ссылке "Не помню код-пароль".
|
||||||
if (node.text.trimmed() == "Не помню код-пароль") {
|
// Матчим только по префиксу до тире: символ тире в тексте варьируется между
|
||||||
|
// сборками (дефис U+002D / em-dash U+2014, который отдаёт текущий WebView-экран),
|
||||||
|
// и точный == по полной строке тогда не срабатывает — экран пин-кода не распознаётся.
|
||||||
|
if (node.text.trimmed().startsWith("Не помню код")) {
|
||||||
isPinScreen = true;
|
isPinScreen = true;
|
||||||
}
|
}
|
||||||
// Fallback: другие банки используют title текст
|
// Fallback: другие банки используют title текст
|
||||||
|
|||||||
@ -1,48 +0,0 @@
|
|||||||
param(
|
|
||||||
[string]$SourceDir,
|
|
||||||
[string]$OutputDir,
|
|
||||||
[string]$Prefix = "ARC_x64_part",
|
|
||||||
[long]$MaxSize = 48000000
|
|
||||||
)
|
|
||||||
|
|
||||||
$SourceDir = $SourceDir.Trim('"', "'", ' ')
|
|
||||||
$OutputDir = $OutputDir.Trim('"', "'", ' ')
|
|
||||||
|
|
||||||
$part = 1
|
|
||||||
$currentSize = 0
|
|
||||||
$currentFiles = @()
|
|
||||||
$allItems = Get-ChildItem -Path $SourceDir -Recurse -File | Sort-Object Length
|
|
||||||
|
|
||||||
function Flush-Part {
|
|
||||||
param($files, $partNum, $size)
|
|
||||||
$zipName = Join-Path $OutputDir "$Prefix$partNum.zip"
|
|
||||||
Write-Host "Creating part $partNum ($([math]::Round($size/1MB,1)) MB, $($files.Count) files)"
|
|
||||||
$tempDir = Join-Path $env:TEMP "arc_split_$partNum"
|
|
||||||
if (Test-Path $tempDir) { Remove-Item $tempDir -Recurse -Force }
|
|
||||||
foreach ($cf in $files) {
|
|
||||||
$dest = Join-Path $tempDir $cf.Rel
|
|
||||||
$destDir = Split-Path $dest -Parent
|
|
||||||
if (!(Test-Path $destDir)) { New-Item -ItemType Directory -Path $destDir -Force | Out-Null }
|
|
||||||
Copy-Item $cf.Full $dest
|
|
||||||
}
|
|
||||||
Compress-Archive -Path (Join-Path $tempDir '*') -DestinationPath $zipName -Force
|
|
||||||
Remove-Item $tempDir -Recurse -Force
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($f in $allItems) {
|
|
||||||
$rel = $f.FullName.Substring($SourceDir.TrimEnd('\').Length)
|
|
||||||
if ($currentSize + $f.Length -gt $MaxSize -and $currentFiles.Count -gt 0) {
|
|
||||||
Flush-Part $currentFiles $part $currentSize
|
|
||||||
$part++
|
|
||||||
$currentSize = 0
|
|
||||||
$currentFiles = @()
|
|
||||||
}
|
|
||||||
$currentFiles += @{ Full = $f.FullName; Rel = $rel }
|
|
||||||
$currentSize += $f.Length
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($currentFiles.Count -gt 0) {
|
|
||||||
Flush-Part $currentFiles $part $currentSize
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "Done: $part part(s) created."
|
|
||||||
Loading…
Reference in New Issue
Block a user