Archived
1

Added 'Save Artwork' toolbar button

This commit is contained in:
Kim Wittenburg
2015-09-15 13:43:18 +02:00
committed by Kim Wittenburg
parent 257a7811d6
commit 3a400037ff
9 changed files with 335 additions and 131 deletions

View File

@@ -109,8 +109,9 @@ public class Album: iTunesType {
/// Saves the album's artwork to the directory specified in the user's
/// preferences (See `Preferences` for details).
public func saveArtwork() throws {
let url = Preferences.sharedPreferences.artworkTarget
try artwork.saveToURL(url, filename: name)
if let url = Preferences.sharedPreferences.artworkTarget {
try artwork.saveToURL(url, filename: name)
}
}
/// Returns `true` if all tracks of the album are saved.