]> git.r.bdr.sh - rbdr/lyricli/blame_incremental - Sources/lyricli.swift
Add lint target to make
[rbdr/lyricli] / Sources / lyricli.swift
... / ...
CommitLineData
1/// The main Lyricli interface
2public class Lyricli {
3 public static var version = "0.0.0-feature/option-parsing"
4
5 public static var showTitle = false
6
7 public static func printLyrics() {
8
9 let sourceManager = SourceManager()
10
11 if let currentTrack = sourceManager.currentTrack {
12
13 let engine = LyricsEngine(withTrack: currentTrack)
14
15 if let lyrics = engine.lyrics {
16 if showTitle {
17 printTitle(currentTrack)
18 }
19
20 print(lyrics)
21 } else {
22 print("Lyrics not found :(")
23 }
24
25 } else {
26 print("No Artist/Song could be found :(")
27 }
28 }
29
30 public static func printSources() {
31 print("Listing Sources: Not yet implemented")
32 }
33
34 public static func enableSource(_ sourceName: String) {
35 print("Enable source \(sourceName): Not yet implemented")
36 }
37
38 public static func disableSource(_ sourceName: String) {
39 print("Disable source \(sourceName): Not yet implemented")
40 }
41
42 public static func resetSource(_ sourceName: String) {
43 print("Reset source \(sourceName): Not yet implemented")
44 }
45
46 private static func printTitle(_ track: Track) {
47 print("\(track.artist) - \(track.name)")
48 }
49}