]> git.r.bdr.sh - rbdr/lyricli/blobdiff - Sources/itunes_source.swift
Fix cut off text in CONTRIBUTING
[rbdr/lyricli] / Sources / itunes_source.swift
index 449dd8a2e8dc83a1d98ad8a3385a610524712c83..6f4aef97f9787a0554743946aa068ad6c283387d 100644 (file)
@@ -44,6 +44,10 @@ class ItunesSource: Source {
                     if let name = track.name {
                         if let artist = track.artist {
 
+                            // track properties are empty strings if itunes is closed
+                            if (!(name != "" && artist != "")) {
+                                return nil
+                            }
                             return Track(withName: name, andArtist: artist)
                         }
                     }