mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-19 13:46:05 +10:00
Merge branch 'main' into sequoia-development
This commit is contained in:
@@ -200,9 +200,12 @@ class CatalogProducts:
|
|||||||
if len(supported_versions) == 4:
|
if len(supported_versions) == 4:
|
||||||
break
|
break
|
||||||
|
|
||||||
# invert the list
|
# Invert the list
|
||||||
supported_versions = supported_versions[::-1]
|
supported_versions = supported_versions[::-1]
|
||||||
|
|
||||||
|
# Create duplicate product list
|
||||||
|
products_copy = products.copy()
|
||||||
|
|
||||||
# Remove all but the newest version
|
# Remove all but the newest version
|
||||||
for version in supported_versions:
|
for version in supported_versions:
|
||||||
_newest_version = packaging.version.parse("0.0.0")
|
_newest_version = packaging.version.parse("0.0.0")
|
||||||
@@ -229,7 +232,7 @@ class CatalogProducts:
|
|||||||
continue
|
continue
|
||||||
try:
|
try:
|
||||||
if packaging.version.parse(installer["Version"]) < _newest_version:
|
if packaging.version.parse(installer["Version"]) < _newest_version:
|
||||||
products.remove(installer)
|
products_copy.pop(products_copy.index(installer))
|
||||||
except packaging.version.InvalidVersion:
|
except packaging.version.InvalidVersion:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@@ -238,14 +241,17 @@ class CatalogProducts:
|
|||||||
if installer["Catalog"] in [SeedType.CustomerSeed, SeedType.DeveloperSeed, SeedType.PublicSeed]:
|
if installer["Catalog"] in [SeedType.CustomerSeed, SeedType.DeveloperSeed, SeedType.PublicSeed]:
|
||||||
for installer_2 in products:
|
for installer_2 in products:
|
||||||
if installer_2["Version"].split(".")[0] == installer["Version"].split(".")[0] and installer_2["Catalog"] not in [SeedType.CustomerSeed, SeedType.DeveloperSeed, SeedType.PublicSeed]:
|
if installer_2["Version"].split(".")[0] == installer["Version"].split(".")[0] and installer_2["Catalog"] not in [SeedType.CustomerSeed, SeedType.DeveloperSeed, SeedType.PublicSeed]:
|
||||||
products.remove(installer)
|
if installer in products_copy:
|
||||||
|
products_copy.pop(products_copy.index(installer))
|
||||||
|
|
||||||
|
|
||||||
# Remove EOL versions (older than n-3)
|
# Remove EOL versions (older than n-3)
|
||||||
for installer in products:
|
for installer in products:
|
||||||
if installer["Version"].split(".")[0] < supported_versions[-4].value:
|
if installer["Version"].split(".")[0] < supported_versions[-4].value:
|
||||||
products.remove(installer)
|
if installer in products_copy:
|
||||||
|
products_copy.pop(products_copy.index(installer))
|
||||||
|
|
||||||
return products
|
return products_copy
|
||||||
|
|
||||||
|
|
||||||
@cached_property
|
@cached_property
|
||||||
|
|||||||
Reference in New Issue
Block a user