mirror of
https://github.com/yattee/yattee.git
synced 2024-12-13 22:00:31 +05:30
5b35c03bc5
Fix #601
41 lines
1.2 KiB
Swift
41 lines
1.2 KiB
Swift
import Defaults
|
|
import SwiftyJSON
|
|
|
|
struct AdvancedSettingsGroupImporter {
|
|
var json: JSON
|
|
|
|
func performImport() {
|
|
if let showPlayNowInBackendContextMenu = json["showPlayNowInBackendContextMenu"].bool {
|
|
Defaults[.showPlayNowInBackendContextMenu] = showPlayNowInBackendContextMenu
|
|
}
|
|
|
|
if let showMPVPlaybackStats = json["showMPVPlaybackStats"].bool {
|
|
Defaults[.showMPVPlaybackStats] = showMPVPlaybackStats
|
|
}
|
|
|
|
if let mpvEnableLogging = json["mpvEnableLogging"].bool {
|
|
Defaults[.mpvEnableLogging] = mpvEnableLogging
|
|
}
|
|
|
|
if let mpvCacheSecs = json["mpvCacheSecs"].string {
|
|
Defaults[.mpvCacheSecs] = mpvCacheSecs
|
|
}
|
|
|
|
if let mpvCachePauseWait = json["mpvCachePauseWait"].string {
|
|
Defaults[.mpvCachePauseWait] = mpvCachePauseWait
|
|
}
|
|
|
|
if let mpvDeinterlace = json["mpvDeinterlace"].bool {
|
|
Defaults[.mpvDeinterlace] = mpvDeinterlace
|
|
}
|
|
|
|
if let showCacheStatus = json["showCacheStatus"].bool {
|
|
Defaults[.showCacheStatus] = showCacheStatus
|
|
}
|
|
|
|
if let feedCacheSize = json["feedCacheSize"].string {
|
|
Defaults[.feedCacheSize] = feedCacheSize
|
|
}
|
|
}
|
|
}
|