mirror of
https://github.com/YTLitePlus/YTLitePlus.git
synced 2026-03-14 11:35:52 +00:00
YTLitePlus/YTLitePlus has been deprecated. This replaces the entire codebase with the active upstream project dayanch96/YTLite. https://claude.ai/code/session_01FD8kBzc7yv5Fdf9G7Z2ZkE
40 lines
898 B
Objective-C
40 lines
898 B
Objective-C
#import "YTLUserDefaults.h"
|
|
|
|
@implementation YTLUserDefaults
|
|
|
|
static NSString *const kDefaultsSuiteName = @"com.dvntm.ytlite";
|
|
|
|
+ (YTLUserDefaults *)standardUserDefaults {
|
|
static dispatch_once_t onceToken;
|
|
static YTLUserDefaults *defaults = nil;
|
|
|
|
dispatch_once(&onceToken, ^{
|
|
defaults = [[self alloc] initWithSuiteName:kDefaultsSuiteName];
|
|
[defaults registerDefaults];
|
|
});
|
|
|
|
return defaults;
|
|
}
|
|
|
|
- (void)reset {
|
|
[self removePersistentDomainForName:kDefaultsSuiteName];
|
|
}
|
|
|
|
- (void)registerDefaults {
|
|
[self registerDefaults:@{
|
|
@"noAds": @YES,
|
|
@"backgroundPlayback": @YES,
|
|
@"removeUploads": @YES,
|
|
@"speedIndex": @1,
|
|
@"autoSpeedIndex": @3,
|
|
@"wiFiQualityIndex": @0,
|
|
@"cellQualityIndex": @0,
|
|
@"pivotIndex": @0
|
|
}];
|
|
}
|
|
|
|
+ (void)resetUserDefaults {
|
|
[[self standardUserDefaults] reset];
|
|
}
|
|
|
|
@end
|