         prepare()
     }
     
-    /**
-     Fetch all the PHAssetCollections asynchronously based on a type and subtype.
-     - Parameter type: A PHAssetCollectionType.
-     - Parameter subtype: A PHAssetCollectionSubtype.
-     - Parameter completion: A completion block.
-     */
-    public func fetchAssetCollections(with type: PHAssetCollectionType, subtype: PHAssetCollectionSubtype, completion: ([PhotoLibraryDataSource]) -> Void) {
-        self.type = type
-        self.subtype = subtype
-        
-        DispatchQueue.global(qos: .default).async { [weak self, type = type, subtype = subtype, completion = completion] in
-            guard let s = self else {
-                return
-            }
-            
-            defer {
-                DispatchQueue.main.async { [weak self] in
-                    guard let s = self else {
-                        return
-                    }
-                    completion(s.collections)
-                }
-            }
-            
-            let options = PHFetchOptions()
-            options.includeHiddenAssets = true
-            options.includeAllBurstAssets = true
-            options.wantsIncrementalChangeDetails = true
-            
-            s.collectionFetchResult = PHAssetCollection.fetchAssetCollections(with: type, subtype: subtype, options: options)
-            
-            s.collectionFetchResult?.enumerateObjects(options: [.concurrent]) { [weak self] (collection, _, _) in
-                guard let s = self else {
-                    return
-                }
-                
-                let options = PHFetchOptions()
-                let descriptor = NSSortDescriptor(key: "creationDate", ascending: false)
-                options.sortDescriptors = [descriptor]
-                options.includeHiddenAssets = true
-                options.includeAllBurstAssets = true
-                options.wantsIncrementalChangeDetails = true
-                
-                s.fetchAssets(in: collection, options: options) { [weak self] (assets, fetchResult) in
-                    guard let s = self else {
-                        return
-                    }
-                    s.collections.append(PhotoLibraryDataSource(fetchResult: fetchResult, collection: collection, assets: assets))
-                }
-            }
-        }
-    }
+//    /**
+//     Fetch all the PHAssetCollections asynchronously based on a type and subtype.
+//     - Parameter type: A PHAssetCollectionType.
+//     - Parameter subtype: A PHAssetCollectionSubtype.
+//     - Parameter completion: A completion block.
+//     */
+//    public func fetchAssetCollections(with type: PHAssetCollectionType, subtype: PHAssetCollectionSubtype, completion: ([PhotoLibraryDataSource]) -> Void) {
+//        self.type = type
+//        self.subtype = subtype
+//        
+//        DispatchQueue.global(qos: .default).async { [weak self, type = type, subtype = subtype, completion = completion] in
+//            guard let s = self else {
+//                return
+//            }
+//            
+//            defer {
+//                DispatchQueue.main.async { [weak self] in
+//                    guard let s = self else {
+//                        return
+//                    }
+//                    completion(s.collections)
+//                }
+//            }
+//            
+//            let options = PHFetchOptions()
+//            options.includeHiddenAssets = true
+//            options.includeAllBurstAssets = true
+//            options.wantsIncrementalChangeDetails = true
+//            
+//            s.collectionFetchResult = PHAssetCollection.fetchAssetCollections(with: type, subtype: subtype, options: options)
+//            
+//            s.collectionFetchResult?.enumerateObjects(options: [.concurrent]) { [weak self] (collection, _, _) in
+//                guard let s = self else {
+//                    return
+//                }
+//                
+//                let options = PHFetchOptions()
+//                let descriptor = NSSortDescriptor(key: "creationDate", ascending: false)
+//                options.sortDescriptors = [descriptor]
+//                options.includeHiddenAssets = true
+//                options.includeAllBurstAssets = true
+//                options.wantsIncrementalChangeDetails = true
+//                
+//                s.fetchAssets(in: collection, options: options) { [weak self] (assets, fetchResult) in
+//                    guard let s = self else {
+//                        return
+//                    }
+//                    s.collections.append(PhotoLibraryDataSource(fetchResult: fetchResult, collection: collection, assets: assets))
+//                }
+//            }
+//        }
+//    }
     
     /**
      Performes an asynchronous change to the PHPhotoLibrary database.

    private func fetch<T: PHFetchResult<U>, U: PHObject>(result: T, completion: ([U], T) -> Void) {
        var objects = [U]()
        
        result.enumerateObjects({ (collection, _, _) in
            objects.append(collection)
        })

     photo library.
     */
    public func photoLibraryDidChange(_ changeInfo: PHChange) {
        for dataSource in fetchResults {
            print(dataSource)
        }
        
//        fetchAssetCollections(with: t, subtype: st) { [weak self, oldCollections = oldCollections] _ in
//            DispatchQueue.main.async { [weak self, oldCollections = oldCollections] in
//                guard let s = self else {
//                    return
//                }
//                
//                // Notify about the general change.
//                s.delegate?.photoLibrary?(photoLibrary: s, didChange: changeInfo)
//                
//                // Notifiy about specific changes.
//                s.collectionFetchResult?.enumerateObjects(options: .concurrent) { [weak self, changeInfo = changeInfo] (collection, _, _) in
//                    guard let s = self else {
//                        return
//                    }
//                    
//                    guard let details = changeInfo.changeDetails(for: collection) else {
//                        return
//                    }
//                    
//                    guard let afterChanges = details.objectAfterChanges else {
//                        return
//                    }
//                    
//                    s.delegate?.photoLibrary?(photoLibrary: s, beforeChanges: details.objectBeforeChanges, afterChanges: afterChanges, assetContentChanged: details.assetContentChanged, objectWasDeleted: details.objectWasDeleted)
//                }
//                
//                for i in 0..<oldCollections.count {
//                    let dataSource = oldCollections[i]
//                    
//                    if let details = changeInfo.changeDetails(for: dataSource.fetchResult as! PHFetchResult<AnyObject>) {
//                        s.delegate?.photoLibrary?(photoLibrary: s, fetchBeforeChanges: details.fetchResultBeforeChanges, fetchAfterChanges: details.fetchResultAfterChanges)
//                        
//                        guard details.hasIncrementalChanges else {
//                            return
//                        }
//                        
//                        let removedIndexes = details.removedIndexes
//                        let insertedIndexes = details.insertedIndexes
//                        let changedIndexes = details.changedIndexes
//                        
//                        if nil != removedIndexes {
//                            s.delegate?.photoLibrary?(photoLibrary: s, removed: removedIndexes!, for: details.removedObjects)
//                        }
//                        
//                        if nil != insertedIndexes {
//                            s.delegate?.photoLibrary?(photoLibrary: s, inserted: insertedIndexes!, for: details.insertedObjects)
//                        }
//                        
//                        if nil != changedIndexes {
//                            s.delegate?.photoLibrary?(photoLibrary: s, changed: changedIndexes!, for: details.changedObjects)
//                        }
//                        
//                        var moves = [PhotoLibraryMove]()
//                        
//                        if details.hasMoves {
//                            details.enumerateMoves { (from, to) in
//                                moves.append(PhotoLibraryMove(from: from, to: to))
//                            }
//                        }
//                        
//                        s.delegate?.photoLibrary?(photoLibrary: s, removedIndexes: removedIndexes, insertedIndexes: insertedIndexes, changedIndexes: changedIndexes, has: moves)
//                    }
//                }
//            }
//        }
    }
}
