Rename isEdited to edited.
This commit is contained in:
1 parent
82dd46773d
commit
acf14c20f5
9 files changed
+53
-52
No files matched your search
@@ -190,7 +190,7 @@
|
||||
- (void)setVolume:(float)newVolume
|
||||
{
|
||||
_volume = newVolume;
|
||||
self.isEdited = YES;
|
||||
self.edited = YES;
|
||||
self.updatedProperty[@"volume"] = @YES;
|
||||
}
|
||||
|
||||
@@ -203,7 +203,7 @@
|
||||
{
|
||||
_fallbackTrack = newFallbackTrack;
|
||||
_fallbackTrackId = 0;
|
||||
self.isEdited = YES;
|
||||
self.edited = YES;
|
||||
self.updatedProperty[@"fallback"] = @YES;
|
||||
}
|
||||
|
||||
@@ -216,7 +216,7 @@
|
||||
{
|
||||
_followsTrack = newFollowsTrack;
|
||||
_followsTrackId = 0;
|
||||
self.isEdited = YES;
|
||||
self.edited = YES;
|
||||
self.updatedProperty[@"follows"] = @YES;
|
||||
}
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
self.enabled = NO;
|
||||
self.language = @"English";
|
||||
self.URL = URL;
|
||||
self.isEdited = YES;
|
||||
self.edited = YES;
|
||||
self.muxed = NO;
|
||||
_areChaptersEdited = YES;
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
|
||||
- (NSUInteger)addChapter:(MP42TextSample *)chapter
|
||||
{
|
||||
self.isEdited = YES;
|
||||
self.edited = YES;
|
||||
_areChaptersEdited = YES;
|
||||
|
||||
[_chapters addObject:chapter];
|
||||
@@ -149,14 +149,14 @@
|
||||
|
||||
- (void)removeChaptersAtIndexes:(NSIndexSet *)indexes
|
||||
{
|
||||
self.isEdited = YES;
|
||||
self.edited = YES;
|
||||
_areChaptersEdited = YES;
|
||||
[_chapters removeObjectsAtIndexes:indexes];
|
||||
}
|
||||
|
||||
- (void)setTimestamp:(MP4Duration)timestamp forChapter:(MP42TextSample *)chapterSample
|
||||
{
|
||||
self.isEdited = YES;
|
||||
self.edited = YES;
|
||||
_areChaptersEdited = YES;
|
||||
[chapterSample setTimestamp:timestamp];
|
||||
[_chapters sortUsingSelector:@selector(compare:)];
|
||||
@@ -164,7 +164,7 @@
|
||||
|
||||
- (void)setTitle:(NSString *)title forChapter:(MP42TextSample *)chapterSample
|
||||
{
|
||||
self.isEdited = YES;
|
||||
self.edited = YES;
|
||||
_areChaptersEdited = YES;
|
||||
[chapterSample setTitle:title];
|
||||
}
|
||||
@@ -178,7 +178,7 @@
|
||||
{
|
||||
BOOL success = YES;
|
||||
|
||||
if ((self.isEdited && _areChaptersEdited) || !self.muxed) {
|
||||
if ((self.edited && _areChaptersEdited) || !self.muxed) {
|
||||
MP4Chapter_t * fileChapters = 0;
|
||||
MP4Duration refTrackDuration;
|
||||
uint32_t chapterCount = 0;
|
||||
|
||||
+1
-1
@@ -415,7 +415,7 @@ static void logCallback(MP4LogLevel loglevel, const char *fmt, va_list ap) {
|
||||
track.sourceId = track.trackId;
|
||||
track.trackId = 0;
|
||||
track.muxed = NO;
|
||||
track.isEdited = YES;
|
||||
track.edited = YES;
|
||||
|
||||
track.language = track.language;
|
||||
track.name = track.name;
|
||||
|
||||
+1
-1
@@ -168,7 +168,7 @@ extern NSString *const MP42MetadataKeySortTVShow;
|
||||
@property(nonatomic, readwrite) uint8_t gapless;
|
||||
@property(nonatomic, readwrite) uint8_t podcast;
|
||||
|
||||
@property(nonatomic, readwrite) BOOL isEdited;
|
||||
@property(nonatomic, readwrite, getter=isEdited) BOOL edited;
|
||||
@property(nonatomic, readwrite) BOOL isArtworkEdited;
|
||||
|
||||
@property(nonatomic, readwrite, copy) NSString *presetName;
|
||||
|
||||
+20
-20
@@ -300,7 +300,7 @@ static const genreType_t genreType_strings[] = {
|
||||
_presetName = NSLocalizedString(@"Unnamed Set", nil);
|
||||
_tagsDict = [[NSMutableDictionary alloc] init];
|
||||
_artworks = [[NSMutableArray alloc] init];
|
||||
_isEdited = NO;
|
||||
_edited = NO;
|
||||
_isArtworkEdited = NO;
|
||||
}
|
||||
|
||||
@@ -589,7 +589,7 @@ static const genreType_t genreType_strings[] = {
|
||||
if (artworkImage.isValid) {
|
||||
MP42Image *artwork = [[MP42Image alloc] initWithImage:artworkImage];
|
||||
[self.artworks addObject:artwork];
|
||||
self.isEdited =YES;
|
||||
self.edited =YES;
|
||||
self.isArtworkEdited = YES;
|
||||
return YES;
|
||||
}
|
||||
@@ -599,7 +599,7 @@ static const genreType_t genreType_strings[] = {
|
||||
} else {
|
||||
// FIXME
|
||||
//self.artworks = nil;
|
||||
self.isEdited = YES;
|
||||
self.edited = YES;
|
||||
self.isArtworkEdited = YES;
|
||||
return YES;
|
||||
}
|
||||
@@ -656,12 +656,12 @@ static const genreType_t genreType_strings[] = {
|
||||
self.gapless = metadata.gapless;
|
||||
self.hdVideo = metadata.hdVideo;
|
||||
|
||||
self.isEdited = YES;
|
||||
self.edited = YES;
|
||||
}
|
||||
|
||||
- (void)removeTagForKey:(NSString *)aKey {
|
||||
[self.tagsDict removeObjectForKey:aKey];
|
||||
self.isEdited = YES;
|
||||
self.edited = YES;
|
||||
}
|
||||
|
||||
- (BOOL)setTag:(id)value forKey:(NSString *)key {
|
||||
@@ -681,12 +681,12 @@ static const genreType_t genreType_strings[] = {
|
||||
} else {
|
||||
self.hdVideo = 0;
|
||||
}
|
||||
self.isEdited = YES;
|
||||
self.edited = YES;
|
||||
|
||||
} else if ([key isEqualToString:MP42MetadataKeyUserGenre]) {
|
||||
if ([value isKindOfClass:[NSNumber class]]) {
|
||||
[self.tagsDict setValue:[self genreFromIndex:[value integerValue]] forKey:key];
|
||||
self.isEdited = YES;
|
||||
self.edited = YES;
|
||||
} else if ([value isKindOfClass:[NSData class]]) {
|
||||
if ([value length] >= 2) {
|
||||
uint8_t* bytes = (uint8_t*)malloc([value length]);
|
||||
@@ -696,11 +696,11 @@ static const genreType_t genreType_strings[] = {
|
||||
|
||||
free(bytes);
|
||||
[self.tagsDict setValue:[self genreFromIndex:genre] forKey:key];
|
||||
self.isEdited = YES;
|
||||
self.edited = YES;
|
||||
}
|
||||
} else if ([value isKindOfClass:[NSString class]]) {
|
||||
[self.tagsDict setValue:value forKey:key];
|
||||
self.isEdited = YES;
|
||||
self.edited = YES;
|
||||
} else {
|
||||
noErr = NO;
|
||||
NSAssert(YES, @"Invalid genre input");
|
||||
@@ -709,18 +709,18 @@ static const genreType_t genreType_strings[] = {
|
||||
} else if ([key isEqualToString:@"Gapless"]) {
|
||||
if ([value isKindOfClass:[NSNumber class]]) {
|
||||
self.gapless = [value integerValue];
|
||||
self.isEdited = YES;
|
||||
self.edited = YES;
|
||||
}
|
||||
else if ([value isKindOfClass:[NSString class]] && [value length] > 0 && [value MP42_isMatchedByRegex:regexPositive]) {
|
||||
self.gapless = 1;
|
||||
self.isEdited = YES;
|
||||
self.edited = YES;
|
||||
} else {
|
||||
self.gapless = 0;
|
||||
self.isEdited = YES;
|
||||
self.edited = YES;
|
||||
}
|
||||
|
||||
} else if ([key isEqualToString:MP42MetadataKeyTrackNumber]) {
|
||||
self.isEdited = YES;
|
||||
self.edited = YES;
|
||||
if ([value isKindOfClass:[NSData class]]) {
|
||||
uint8_t* bytes = (uint8_t*)malloc([value length]);
|
||||
memcpy(bytes, [value bytes], [value length]);
|
||||
@@ -740,7 +740,7 @@ static const genreType_t genreType_strings[] = {
|
||||
}
|
||||
|
||||
} else if ([key isEqualToString:MP42MetadataKeyDiscNumber]) {
|
||||
self.isEdited = YES;
|
||||
self.edited = YES;
|
||||
if ([value isKindOfClass:[NSData class]]) {
|
||||
uint8_t* bytes = (uint8_t*)malloc([value length]);
|
||||
memcpy(bytes, [value bytes], [value length]);
|
||||
@@ -756,7 +756,7 @@ static const genreType_t genreType_strings[] = {
|
||||
[self.tagsDict setValue:value forKey:key];
|
||||
}
|
||||
} else if ([key isEqualToString:MP42MetadataKeyRating]) {
|
||||
self.isEdited = YES;
|
||||
self.edited = YES;
|
||||
if ([value isKindOfClass:[NSString class]]) {
|
||||
NSNumber *index = @([[MP42Ratings defaultManager] ratingIndexForiTunesCode:value]);
|
||||
[self.tagsDict setValue:index forKey:key];
|
||||
@@ -766,7 +766,7 @@ static const genreType_t genreType_strings[] = {
|
||||
}
|
||||
|
||||
} else if ([key isEqualToString:MP42MetadataKeyContentRating]) {
|
||||
self.isEdited = YES;
|
||||
self.edited = YES;
|
||||
if ([value isKindOfClass:[NSNumber class]]) {
|
||||
self.contentRating = [value integerValue];
|
||||
} else if ([value isKindOfClass:[NSString class]]) {
|
||||
@@ -777,7 +777,7 @@ static const genreType_t genreType_strings[] = {
|
||||
}
|
||||
|
||||
} else if ([key isEqualToString:@"Media Kind"]) {
|
||||
self.isEdited = YES;
|
||||
self.edited = YES;
|
||||
if ([value isKindOfClass:[NSNumber class]]) {
|
||||
self.mediaKind = [value integerValue];
|
||||
} else if ([value isKindOfClass:[NSString class]]) {
|
||||
@@ -792,7 +792,7 @@ static const genreType_t genreType_strings[] = {
|
||||
|
||||
} else if (![self.tagsDict[key] isEqualTo:value]) {
|
||||
[self.tagsDict setValue:value forKey:key];
|
||||
self.isEdited = YES;
|
||||
self.edited = YES;
|
||||
|
||||
} else {
|
||||
noErr = NO;
|
||||
@@ -1692,7 +1692,7 @@ static const genreType_t genreType_strings[] = {
|
||||
[coder encodeInt:_gapless forKey:@"MP42Gapless"];
|
||||
[coder encodeInt:_podcast forKey:@"MP42Podcast"];
|
||||
|
||||
[coder encodeBool:_isEdited forKey:@"MP42Edited"];
|
||||
[coder encodeBool:_edited forKey:@"MP42Edited"];
|
||||
}
|
||||
|
||||
- (id)initWithCoder:(NSCoder *)decoder
|
||||
@@ -1725,7 +1725,7 @@ static const genreType_t genreType_strings[] = {
|
||||
_gapless = [decoder decodeIntForKey:@"MP42Gapless"];
|
||||
_podcast = [decoder decodeIntForKey:@"MP42Podcast"];
|
||||
|
||||
_isEdited = [decoder decodeBoolForKey:@"MP42Edited"];
|
||||
_edited = [decoder decodeBoolForKey:@"MP42Edited"];
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
if (self.isEdited && !self.muxed) {
|
||||
if (self.edited && !self.muxed) {
|
||||
float trackWidth, trackHeight;
|
||||
MP4GetTrackFloatProperty(fileHandle, self.trackId, "tkhd.width", &trackWidth);
|
||||
MP4GetTrackFloatProperty(fileHandle, self.trackId, "tkhd.height", &trackHeight);
|
||||
@@ -158,7 +158,7 @@
|
||||
- (void)setSomeSamplesAreForced:(BOOL)value
|
||||
{
|
||||
_someSamplesAreForced = value;
|
||||
self.isEdited = YES;
|
||||
self.edited = YES;
|
||||
|
||||
self.updatedProperty[@"forcedSubtitles"] = @YES;
|
||||
}
|
||||
@@ -170,7 +170,7 @@
|
||||
- (void)setAllSamplesAreForced:(BOOL)value
|
||||
{
|
||||
_allSamplesAreForced = value;
|
||||
self.isEdited = YES;
|
||||
self.edited = YES;
|
||||
|
||||
self.updatedProperty[@"forcedSubtitles"] = @YES;
|
||||
}
|
||||
@@ -413,7 +413,7 @@ static void insertTagsFromStyleRecord(style_record record, NSMutableString *samp
|
||||
{
|
||||
_forcedTrack = newForcedTrack;
|
||||
_forcedTrackId = 0;
|
||||
self.isEdited = YES;
|
||||
self.edited = YES;
|
||||
self.updatedProperty[@"forced"] = @YES;
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property(nonatomic, readwrite) uint32_t bitrate;
|
||||
@property(nonatomic, readwrite) uint64_t dataLength;
|
||||
|
||||
@property(nonatomic, readwrite) BOOL isEdited;
|
||||
@property(nonatomic, readwrite, getter=isEdited) BOOL edited;
|
||||
@property(nonatomic, readwrite) BOOL muxed;
|
||||
|
||||
@property(nonatomic, readonly) NSMutableDictionary<NSString *, NSNumber *> *updatedProperty;
|
||||
|
||||
+13
-12
@@ -32,15 +32,16 @@
|
||||
|
||||
@property(nonatomic, readwrite, copy) NSURL *URL;
|
||||
|
||||
@property(nonatomic, readwrite) FourCharCode format;
|
||||
@property(nonatomic, readwrite) MP42CodecType format;
|
||||
@property(nonatomic, readwrite) MP42MediaType mediaType;
|
||||
|
||||
@property(nonatomic, readwrite) MP42Duration duration;
|
||||
@property(nonatomic, readwrite) uint64_t dataLength;
|
||||
@property(nonatomic, readwrite) uint32_t bitrate;
|
||||
|
||||
@property(nonatomic, readwrite) BOOL muxed;
|
||||
|
||||
@property(nonatomic, readwrite) BOOL isEdited;
|
||||
@property(nonatomic, readwrite, getter=isEdited) BOOL edited;
|
||||
@property(nonatomic, readonly) NSMutableDictionary<NSString *, NSNumber *> *updatedProperty;
|
||||
|
||||
@end
|
||||
@@ -63,7 +64,7 @@
|
||||
if ((self = [super init])) {
|
||||
_URL = URL;
|
||||
_trackId = (MP4TrackId)trackID;
|
||||
_isEdited = NO;
|
||||
_edited = NO;
|
||||
_muxed = YES;
|
||||
_updatedProperty = [[NSMutableDictionary alloc] init];
|
||||
|
||||
@@ -278,7 +279,7 @@
|
||||
_name = [self defaultName];
|
||||
}
|
||||
|
||||
self.isEdited = YES;
|
||||
self.edited = YES;
|
||||
_updatedProperty[@"name"] = @YES;
|
||||
|
||||
}
|
||||
@@ -290,7 +291,7 @@
|
||||
- (void)setLanguage:(NSString *)newLang
|
||||
{
|
||||
_language = [newLang copy];
|
||||
self.isEdited = YES;
|
||||
self.edited = YES;
|
||||
_updatedProperty[@"language"] = @YES;
|
||||
|
||||
}
|
||||
@@ -302,14 +303,14 @@
|
||||
- (void)setExtendedLanguageTag:(NSString *)newExtendedLanguageTag
|
||||
{
|
||||
_extendedLanguageTag = [newExtendedLanguageTag copy];
|
||||
self.isEdited = YES;
|
||||
self.edited = YES;
|
||||
_updatedProperty[@"extendedLanguageTag"] = @YES;
|
||||
}
|
||||
|
||||
- (void)setMediaCharacteristicTags:(NSSet<NSString *> *)mediaCharacteristicTags
|
||||
{
|
||||
_mediaCharacteristicTags = [mediaCharacteristicTags copy];
|
||||
self.isEdited = YES;
|
||||
self.edited = YES;
|
||||
_updatedProperty[@"mediaCharacteristicTags"] = @YES;
|
||||
}
|
||||
|
||||
@@ -317,7 +318,7 @@
|
||||
{
|
||||
if (_enabled != newState) {
|
||||
_enabled = newState;
|
||||
self.isEdited = YES;
|
||||
self.edited = YES;
|
||||
_updatedProperty[@"enabled"] = @YES;
|
||||
}
|
||||
}
|
||||
@@ -333,7 +334,7 @@
|
||||
- (void)setAlternate_group:(uint64_t)newGroup
|
||||
{
|
||||
_alternate_group = newGroup;
|
||||
self.isEdited = YES;
|
||||
self.edited = YES;
|
||||
_updatedProperty[@"alternate_group"] = @YES;
|
||||
}
|
||||
|
||||
@@ -344,7 +345,7 @@
|
||||
- (void)setStartOffset:(int64_t)newOffset
|
||||
{
|
||||
_startOffset = newOffset;
|
||||
self.isEdited = YES;
|
||||
self.edited = YES;
|
||||
_updatedProperty[@"start_offset"] = @YES;
|
||||
}
|
||||
|
||||
@@ -404,7 +405,7 @@
|
||||
[coder encodeInt64:_alternate_group forKey:@"alternate_group"];
|
||||
[coder encodeInt64:_startOffset forKey:@"startOffset"];
|
||||
|
||||
[coder encodeBool:_isEdited forKey:@"isEdited"];
|
||||
[coder encodeBool:_edited forKey:@"isEdited"];
|
||||
[coder encodeBool:_muxed forKey:@"muxed"];
|
||||
[coder encodeObject:_conversionSettings forKey:@"conversionSettings"];
|
||||
|
||||
@@ -452,7 +453,7 @@
|
||||
_alternate_group = [decoder decodeInt64ForKey:@"alternate_group"];
|
||||
_startOffset = [decoder decodeInt64ForKey:@"startOffset"];
|
||||
|
||||
_isEdited = [decoder decodeBoolForKey:@"isEdited"];
|
||||
_edited = [decoder decodeBoolForKey:@"isEdited"];
|
||||
_muxed = [decoder decodeBoolForKey:@"muxed"];
|
||||
_conversionSettings = [decoder decodeObjectOfClass:[MP42ConversionSettings class] forKey:@"conversionSettings"];
|
||||
|
||||
|
||||
@@ -178,7 +178,7 @@
|
||||
- (void)setHSpacing:(uint64_t)newHSpacing
|
||||
{
|
||||
_hSpacing = newHSpacing;
|
||||
self.isEdited = YES;
|
||||
self.edited = YES;
|
||||
self.updatedProperty[@"hSpacing"] = @YES;
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@
|
||||
- (void)setVSpacing:(uint64_t)newVSpacing
|
||||
{
|
||||
_vSpacing = newVSpacing;
|
||||
self.isEdited = YES;
|
||||
self.edited = YES;
|
||||
self.updatedProperty[@"vSpacing"] = @YES;
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@
|
||||
- (void)setNewProfile:(uint8_t)newProfile
|
||||
{
|
||||
_newProfile = newProfile;
|
||||
self.isEdited = YES;
|
||||
self.edited = YES;
|
||||
|
||||
if (_newProfile == _origProfile) {
|
||||
self.updatedProperty[@"profile"] = @NO;
|
||||
@@ -217,7 +217,7 @@
|
||||
- (void)setNewLevel:(uint8_t)newLevel
|
||||
{
|
||||
_newLevel = newLevel;
|
||||
self.isEdited = YES;
|
||||
self.edited = YES;
|
||||
|
||||
if (_newLevel == _origLevel) {
|
||||
self.updatedProperty[@"level"] = @NO;
|
||||
|
||||
Reference in new issue
Block a user