Refactored handling of MediaFileLibraries