Store size for media for safer indentification
This commit is contained in:
parent
7bf30dc43e
commit
41beabba04
|
@ -45,10 +45,14 @@
|
|||
NSManagedObjectContext *moc = [self managedObjectContext];
|
||||
MAMedia * media = [NSEntityDescription insertNewObjectForEntityForName:@"MAMedia" inManagedObjectContext:moc];
|
||||
NSString * path = [url path];
|
||||
NSNumber * size;
|
||||
[url getResourceValue:&size forKey:NSURLFileSizeKey error:nil];
|
||||
|
||||
media.media = path;
|
||||
media.date = [date timeIntervalSinceReferenceDate];
|
||||
media.name = name;
|
||||
media.notes = @"";
|
||||
media.size = size ? [size longLongValue] : 0;
|
||||
}
|
||||
|
||||
#pragma mark Annotation management
|
||||
|
|
Loading…
Reference in New Issue
Block a user