diff --git a/SwiftRadio/Config/Config.swift b/SwiftRadio/Config/Config.swift index 01e2eefc..c6211246 100755 --- a/SwiftRadio/Config/Config.swift +++ b/SwiftRadio/Config/Config.swift @@ -35,6 +35,7 @@ struct Config { LibraryItem(owner: "MengTo", repo: "Spring"), LibraryItem(owner: "ninjaprox", repo: "NVActivityIndicatorView"), LibraryItem(owner: "LeoNatan", repo: "LNPopupController"), + LibraryItem(owner: "cbpowell", repo: "MarqueeLabel"), ] } diff --git a/SwiftRadio/ViewControllers/NowPlayingViewController.swift b/SwiftRadio/ViewControllers/NowPlayingViewController.swift index 104965c5..87741462 100755 --- a/SwiftRadio/ViewControllers/NowPlayingViewController.swift +++ b/SwiftRadio/ViewControllers/NowPlayingViewController.swift @@ -117,15 +117,13 @@ class NowPlayingViewController: UIViewController { func playerStateDidChange(_ state: FRadioPlayer.State) { switch state { - case .loading: + case .loading where player.playbackState != .stopped: albumArtworkView.setBuffering(true) case .readyToPlay, .loadingFinished: albumArtworkView.setBuffering(false) playbackStateDidChange(player.playbackState) - case .error: - albumArtworkView.setBuffering(false) default: - break + albumArtworkView.setBuffering(false) } } diff --git a/SwiftRadio/ViewControllers/StationsViewController.swift b/SwiftRadio/ViewControllers/StationsViewController.swift index 72d75e89..f002ffed 100755 --- a/SwiftRadio/ViewControllers/StationsViewController.swift +++ b/SwiftRadio/ViewControllers/StationsViewController.swift @@ -284,12 +284,10 @@ extension StationsViewController: FRadioPlayerObserver { func radioPlayer(_ player: FRadioPlayer, playerStateDidChange state: FRadioPlayer.State) { switch state { - case .loading: + case .loading where player.playbackState != .stopped: isBuffering = true - case .readyToPlay, .loadingFinished, .error: - isBuffering = false default: - break + isBuffering = false } updateNowPlayingAnimation() updateVisibleCellsNowPlaying()