diff --git a/Persephone/Controllers/NotificationsController.swift b/Persephone/Controllers/NotificationsController.swift index a2fea50..555712f 100644 --- a/Persephone/Controllers/NotificationsController.swift +++ b/Persephone/Controllers/NotificationsController.swift @@ -36,11 +36,11 @@ class NotificationsController: MPDClientDelegate { ) } - func willUpdateDatabase(mpdClient: MPDClient) { + func willStartDatabaseUpdate(mpdClient: MPDClient) { sendNotification(name: Notification.databaseUpdateStarted) } - func didUpdateDatabase(mpdClient: MPDClient) { + func didFinishDatabaseUpdate(mpdClient: MPDClient) { sendNotification(name: Notification.databaseUpdateFinished) } diff --git a/Persephone/MPDClient/Extensions/MPDClient+Idle.swift b/Persephone/MPDClient/Extensions/MPDClient+Idle.swift index 003dd48..68de625 100644 --- a/Persephone/MPDClient/Extensions/MPDClient+Idle.swift +++ b/Persephone/MPDClient/Extensions/MPDClient+Idle.swift @@ -52,9 +52,9 @@ extension MPDClient { self.fetchStatus() if self.status?.updating ?? false { - self.delegate?.willUpdateDatabase(mpdClient: self) + self.delegate?.willStartDatabaseUpdate(mpdClient: self) } else { - self.delegate?.didUpdateDatabase(mpdClient: self) + self.delegate?.didFinishDatabaseUpdate(mpdClient: self) } } if !mpdIdle.isEmpty { diff --git a/Persephone/MPDClient/Protocols/Delegate.swift b/Persephone/MPDClient/Protocols/Delegate.swift index 67e24ce..90282c5 100644 --- a/Persephone/MPDClient/Protocols/Delegate.swift +++ b/Persephone/MPDClient/Protocols/Delegate.swift @@ -15,8 +15,8 @@ protocol MPDClientDelegate { func didUpdateState(mpdClient: MPDClient, state: MPDClient.Status.State) func didUpdateTime(mpdClient: MPDClient, total: UInt, elapsedMs: UInt) - func willUpdateDatabase(mpdClient: MPDClient) - func didUpdateDatabase(mpdClient: MPDClient) + func willStartDatabaseUpdate(mpdClient: MPDClient) + func didFinishDatabaseUpdate(mpdClient: MPDClient) func didUpdateQueue(mpdClient: MPDClient, queue: [MPDClient.Song]) func didUpdateQueuePos(mpdClient: MPDClient, song: Int)