diff --git a/TagTunes/Base.lproj/Main.storyboard b/TagTunes/Base.lproj/Main.storyboard index d576470..fc6f366 100644 --- a/TagTunes/Base.lproj/Main.storyboard +++ b/TagTunes/Base.lproj/Main.storyboard @@ -760,11 +760,11 @@ CA - + - + @@ -810,7 +810,7 @@ CA - + @@ -824,18 +824,41 @@ CA + + + + + + + If selected, TagTunes will use lower resolution artworks in its window. Using this option may make searching faster but will also slow down saving. + + + + + + + + + @@ -845,7 +868,7 @@ CA - + @@ -857,18 +880,18 @@ CA - + - + - - - - - - - - - + + + + + + + + + - + - + - + @@ -1020,18 +1043,43 @@ CA + + + + + + + + + + - + + + + + + @@ -1040,7 +1088,7 @@ CA - + @@ -1051,7 +1099,7 @@ CA - + diff --git a/TagTunes/Preferences.swift b/TagTunes/Preferences.swift index 9137ee3..2850af2 100644 --- a/TagTunes/Preferences.swift +++ b/TagTunes/Preferences.swift @@ -38,7 +38,9 @@ import Cocoa static let useCensoredNamesKey = "Use Censored Names" - static let caseSensitive = "Case Sensitive" + static let caseSensitiveKey = "Case Sensitive" + + static let clearArtworksKey = "Clear Artworks" static let tagSavingBehaviorsKey = "Tag Saving Behaviors" } @@ -71,7 +73,8 @@ import Cocoa UserDefaultsConstants.keepSearchResultsKey: false, UserDefaultsConstants.removeSavedAlbumsKey: false, UserDefaultsConstants.useCensoredNamesKey: false, - UserDefaultsConstants.caseSensitive: true + UserDefaultsConstants.caseSensitiveKey: true, + UserDefaultsConstants.clearArtworksKey: false ]) if NSUserDefaults.standardUserDefaults().dictionaryForKey(UserDefaultsConstants.tagSavingBehaviorsKey) == nil { var savingBehaviors: [Track.Tag: TagSavingBehavior] = [:] @@ -80,7 +83,6 @@ import Cocoa } tagSavingBehaviors = savingBehaviors } - artworkTarget = nil } // MARK: General Preferences @@ -135,10 +137,20 @@ import Cocoa /// If `true` TagTunes ignores cases when comparing track titles and albums. public dynamic var caseSensitive: Bool { set { - NSUserDefaults.standardUserDefaults().setBool(newValue, forKey: UserDefaultsConstants.caseSensitive) + NSUserDefaults.standardUserDefaults().setBool(newValue, forKey: UserDefaultsConstants.caseSensitiveKey) } get { - return NSUserDefaults.standardUserDefaults().boolForKey(UserDefaultsConstants.caseSensitive) + return NSUserDefaults.standardUserDefaults().boolForKey(UserDefaultsConstants.caseSensitiveKey) + } + } + + /// If `true` TagTunes clears the artworsk of saved tracks. + public dynamic var clearArtworks: Bool { + set { + NSUserDefaults.standardUserDefaults().setBool(newValue, forKey: UserDefaultsConstants.clearArtworksKey) + } + get { + return NSUserDefaults.standardUserDefaults().boolForKey(UserDefaultsConstants.clearArtworksKey) } } diff --git a/TagTunes/Track.swift b/TagTunes/Track.swift index 811d502..7d19802 100644 --- a/TagTunes/Track.swift +++ b/TagTunes/Track.swift @@ -141,10 +141,9 @@ public class Track: iTunesType { saveTag(.SortComposer, toTrack: track, value: nil) saveTag(.Comment, toTrack: track, value: nil) - // TODO: Deal with artworks -// if Preferences.sharedPreferences.clearArtworks { -// track.artworks().removeAllObjects() -// } + if Preferences.sharedPreferences.clearArtworks { + track.artworks().removeAllObjects() + } } private func saveTag(tag: Tag, toTrack track: iTunesTrack, value: AnyObject?) {