LibraryController needs an architectural overhaul and should decouple MediaModel from View Representation
Currently we create a copy of the exsisting mediaitems (_foundMedia) in the VLCLibraryController. We work with this array to determine what to display and edit the copy and additionally manipulate the model in this file as well.
This can lead to inconsistency when the underlying Media changes and the view is not updated or the views are updated but the underlying model isn't.
As a first step we should decouple code that modifies the Medialibrary from the view presentation. The controller should only request e.g. deletion of a file and react to delegate callbacks or notifications when the media manipulation e.g. deletion is done to update it's view.
methods that should not be in the LibraryViewController:
- (void)removeMediaObject:(id)managedObject updateDatabase:(BOOL)updateDB
- (void)_deleteMediaObject:(MLFile *)mediaObject
- (void)removeFromFolder that works with state held in _indexPaths
calls that should never be made from the LibraryController:
[MLMediaLibrary sharedMediaLibrary]createObjectForEntity [MLAlbum allAlbums], [MLShow allshows] and basically ever block that is within @Synchronized