Enables syncing DS(i) BIOS files
Excludes DSi NAND for now, since it is ~240MB and Harmony can’t selectively download files (yet).
This commit is contained in:
parent
f316e7cca0
commit
bf2461fae1
@ -9,6 +9,8 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
import DeltaCore
|
import DeltaCore
|
||||||
|
import MelonDSDeltaCore
|
||||||
|
|
||||||
import Harmony
|
import Harmony
|
||||||
|
|
||||||
public extension Game
|
public extension Game
|
||||||
@ -142,12 +144,32 @@ extension Game: Syncable
|
|||||||
}
|
}
|
||||||
|
|
||||||
public var syncableFiles: Set<File> {
|
public var syncableFiles: Set<File> {
|
||||||
let gameFile = File(identifier: "game", fileURL: self.fileURL)
|
|
||||||
|
|
||||||
let artworkURL = DatabaseManager.artworkURL(for: self)
|
let artworkURL = DatabaseManager.artworkURL(for: self)
|
||||||
let artworkFile = File(identifier: "artwork", fileURL: artworkURL)
|
let artworkFile = File(identifier: "artwork", fileURL: artworkURL)
|
||||||
|
|
||||||
return [gameFile, artworkFile]
|
switch self.identifier
|
||||||
|
{
|
||||||
|
case Game.melonDSBIOSIdentifier:
|
||||||
|
let bios7File = File(identifier: "bios7", fileURL: MelonDSEmulatorBridge.shared.bios7URL)
|
||||||
|
let bios9File = File(identifier: "bios9", fileURL: MelonDSEmulatorBridge.shared.bios9URL)
|
||||||
|
let firmwareFile = File(identifier: "firmware", fileURL: MelonDSEmulatorBridge.shared.firmwareURL)
|
||||||
|
|
||||||
|
return [artworkFile, bios7File, bios9File, firmwareFile]
|
||||||
|
|
||||||
|
case Game.melonDSDSiBIOSIdentifier:
|
||||||
|
let bios7File = File(identifier: "bios7", fileURL: MelonDSEmulatorBridge.shared.dsiBIOS7URL)
|
||||||
|
let bios9File = File(identifier: "bios9", fileURL: MelonDSEmulatorBridge.shared.dsiBIOS9URL)
|
||||||
|
let firmwareFile = File(identifier: "firmware", fileURL: MelonDSEmulatorBridge.shared.dsiFirmwareURL)
|
||||||
|
|
||||||
|
// DSi NAND is ~240MB, so don't sync for now until Harmony can selectively download files.
|
||||||
|
// let nandFile = File(identifier: "nand", fileURL: MelonDSEmulatorBridge.shared.dsiNANDURL)
|
||||||
|
|
||||||
|
return [artworkFile, bios7File, bios9File, firmwareFile]
|
||||||
|
|
||||||
|
default:
|
||||||
|
let gameFile = File(identifier: "game", fileURL: self.fileURL)
|
||||||
|
return [artworkFile, gameFile]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public var syncableRelationships: Set<AnyKeyPath> {
|
public var syncableRelationships: Set<AnyKeyPath> {
|
||||||
@ -157,8 +179,4 @@ extension Game: Syncable
|
|||||||
public var syncableLocalizedName: String? {
|
public var syncableLocalizedName: String? {
|
||||||
return self.name
|
return self.name
|
||||||
}
|
}
|
||||||
|
|
||||||
public var isSyncingEnabled: Bool {
|
|
||||||
return self.identifier != Game.melonDSBIOSIdentifier && self.identifier != Game.melonDSDSiBIOSIdentifier
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user