|
@@ -142,19 +142,17 @@ public class Nexilis: NSObject {
|
|
|
cursorData.close()
|
|
|
}
|
|
|
})
|
|
|
- DispatchQueue.global().asyncAfter(deadline: .now() + 1.5, execute: {
|
|
|
- Database.shared.database?.inTransaction({ (fmdb, rollback) in
|
|
|
- if let cursorData = Database.shared.getRecords(fmdb: fmdb, query: "SELECT image_id FROM GROUPZ where group_type = 1 AND official = 1"), cursorData.next() {
|
|
|
- do {
|
|
|
- let documentDir = try FileManager.default.url(for: .documentDirectory, in: .userDomainMask, appropriateFor: nil, create: true)
|
|
|
- let file = documentDir.appendingPathComponent(cursorData.string(forColumnIndex: 0)!)
|
|
|
- if !FileManager().fileExists(atPath: file.path) {
|
|
|
- Download().start(forKey: cursorData.string(forColumnIndex: 0)!) { (name, progress) in}
|
|
|
- }
|
|
|
- } catch {}
|
|
|
- cursorData.close()
|
|
|
- }
|
|
|
- })
|
|
|
+ Database.shared.database?.inTransaction({ (fmdb, rollback) in
|
|
|
+ if let cursorData = Database.shared.getRecords(fmdb: fmdb, query: "SELECT image_id FROM GROUPZ where group_type = 1 AND official = 1"), cursorData.next() {
|
|
|
+ do {
|
|
|
+ let documentDir = try FileManager.default.url(for: .documentDirectory, in: .userDomainMask, appropriateFor: nil, create: true)
|
|
|
+ let file = documentDir.appendingPathComponent(cursorData.string(forColumnIndex: 0)!)
|
|
|
+ if !FileManager().fileExists(atPath: file.path) {
|
|
|
+ Download().start(forKey: cursorData.string(forColumnIndex: 0)!) { (name, progress) in}
|
|
|
+ }
|
|
|
+ } catch {}
|
|
|
+ cursorData.close()
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
getServiceBank()
|