X-Git-Url: https://git.r.bdr.sh/rbdr/lyricli/blobdiff_plain/a968bff7e21c9372deca5fce5921999b45d5d348..fc3f842abd1fd804fbb7a04f123c2102a785dfc3:/Sources/source_manager.swift diff --git a/Sources/source_manager.swift b/Sources/source_manager.swift index dd956ad..e55cc8b 100644 --- a/Sources/source_manager.swift +++ b/Sources/source_manager.swift @@ -6,16 +6,13 @@ class SourceManager { ] var currentTrack: Track? { - get { - - for source in enabledSources { - if let currentTrack = source.currentTrack { - return currentTrack - } + for source in enabledSources { + if let currentTrack = source.currentTrack { + return currentTrack } - - return nil } + + return nil } var enabledSources: [Source] { @@ -23,19 +20,17 @@ class SourceManager { // Checks the config and returns an array of sources based on the // enabled and available ones - get { - var sources = [Source]() + var sources = [Source]() - if let sourceNames = Configuration.sharedInstance["enabled_sources"] as? [String]{ - for sourceName in sourceNames { - if let source = availableSources[sourceName] { - sources.append(source) - } + if let sourceNames = Configuration.sharedInstance["enabled_sources"] as? [String] { + for sourceName in sourceNames { + if let source = availableSources[sourceName] { + sources.append(source) } } - - return sources } + + return sources } func enable(sourceName: String) {