You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If JSON is improperly formatted and does not contain any Games, it could be imported and loaded into the database without ever being able to access it.
The text was updated successfully, but these errors were encountered:
Filter Mods list by Game
Note that existing Mods will become inaccessible (related to #104)
There has been no release with mods yet, so I'm considering this to be OK.
Since I had Mods with no games in my install of the app, I simply threw this at the bottom of the preloadData() function in the app delegate to get all of the mods added to the Skyrims.
letcontext=CoreDataStack.shared.mainContext
letmodsFR:NSFetchRequest<Mod>=Mod.fetchRequest()letmods=try? context.fetch(modsFR)letgamesFR:NSFetchRequest<Game>=Game.fetchRequest()letallGames=try? context.fetch(gamesFR)letskyrims= allGames?.filter{ $0.name?.lowercased().contains("skyrim")?? false }
for mod in mods ??[]{
for skyrim in skyrims ??[]{
mod.addToGames(skyrim)}}
A cleanup script could run after imports to remove objects with no games. This could be done on the background thread the import happens on so that when the prompt shows the list of imported objects, invalid objects won't be included.
If JSON is improperly formatted and does not contain any Games, it could be imported and loaded into the database without ever being able to access it.
The text was updated successfully, but these errors were encountered: