Merge branch 'v5.0.1' into pb-video

This commit is contained in:
leminlimez
2025-03-25 12:25:27 -04:00
4 changed files with 23 additions and 11 deletions

View File

@@ -2,8 +2,9 @@ from enum import Enum
from pymobiledevice3.lockdown import LockdownClient
class Device:
def __init__(self, uuid: int, name: str, version: str, build: str, model: str, hardware: str, cpu: str, locale: str, ld: LockdownClient):
def __init__(self, uuid: int, usb: bool, name: str, version: str, build: str, model: str, hardware: str, cpu: str, locale: str, ld: LockdownClient):
self.uuid = uuid
self.connected_via_usb = usb
self.name = name
self.version = version
self.build = build

View File

@@ -109,6 +109,7 @@ class DeviceManager:
pass
dev = Device(
uuid=device.serial,
usb=device.is_usb,
name=vals['DeviceName'],
version=vals['ProductVersion'],
build=vals['BuildVersion'],

View File

@@ -19,7 +19,7 @@ from tweaks.custom_gestalt_tweaks import CustomGestaltTweaks, ValueTypeStrings
from tweaks.daemons_tweak import Daemon
App_Version = "5.1"
App_Build = 1
App_Build = 2
class Page(Enum):
Home = 0
@@ -283,7 +283,13 @@ class MainWindow(QtWidgets.QMainWindow):
self.ui.devicePicker.setEnabled(True)
# populate the ComboBox with device names
for device in self.device_manager.devices:
self.ui.devicePicker.addItem(device.name)
tag = ""
if self.device_manager.apply_over_wifi:
if device.connected_via_usb:
tag = " (@ USB)"
else:
tag = " (@ WiFi)"
self.ui.devicePicker.addItem(f"{device.name}{tag}")
# show all pages
self.ui.sidebarDiv1.show()

View File

@@ -194,18 +194,22 @@ class PosterboardTweak(Tweak):
return
if self.resetting:
# null out the folder
file_path = ""
file_paths = []
if self.resetType == 0:
# resetting descriptors
file_path = "/61/Extensions/com.apple.WallpaperKit.CollectionsPoster/descriptors"
file_paths.append("/61/Extensions/com.apple.WallpaperKit.CollectionsPoster/descriptors")
file_paths.append("/61/Extensions/com.apple.MercuryPoster/descriptors")
elif self.resetType == 2:
# resetting suggested photos
file_path = "/61/Extensions/com.apple.PhotosUIPrivate.PhotosPosterProvider/descriptors"
files_to_restore.append(FileToRestore(
contents=b"",
restore_path=f"/Library/Application Support/PRBPosterExtensionDataStore{file_path}",
domain=f"AppDomain-{self.bundle_id}"
))
file_paths.append("/61/Extensions/com.apple.PhotosUIPrivate.PhotosPosterProvider/descriptors")
else:
file_paths.append("")
for file_path in file_paths:
files_to_restore.append(FileToRestore(
contents=b"",
restore_path=f"/Library/Application Support/PRBPosterExtensionDataStore{file_path}",
domain=f"AppDomain-{self.bundle_id}"
))
return
elif (self.tendies == None or len(self.tendies) == 0) and (self.videoThumbnail == None or self.videoThumbnail == None):
return