mirror of
https://github.com/transmission/transmission.git
synced 2026-04-20 16:59:43 +01:00
Revert r13468 for now.
This commit is contained in:
@@ -20,6 +20,7 @@ NSString * generateIconData(NSString * fileExtension, NSUInteger width, NSMutabl
|
||||
[renderedIcon unlockFocus];
|
||||
|
||||
NSData * iconData = [renderedIcon TIFFRepresentation];
|
||||
[renderedIcon release];
|
||||
|
||||
NSDictionary * imgProps = @{
|
||||
(NSString *)kQLPreviewPropertyMIMETypeKey : @"image/png",
|
||||
@@ -42,7 +43,7 @@ OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview,
|
||||
//try to parse the torrent file
|
||||
tr_info inf;
|
||||
tr_ctor * ctor = tr_ctorNew(NULL);
|
||||
tr_ctorSetMetainfoFromFile(ctor, [[(__bridge NSURL *)url path] UTF8String]);
|
||||
tr_ctorSetMetainfoFromFile(ctor, [[(NSURL *)url path] UTF8String]);
|
||||
const int err = tr_torrentParse(ctor, &inf);
|
||||
tr_ctorFree(ctor);
|
||||
if (err)
|
||||
@@ -168,7 +169,7 @@ OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview,
|
||||
(NSString *)kQLPreviewPropertyMIMETypeKey : @"text/html",
|
||||
(NSString *)kQLPreviewPropertyAttachmentsKey : allImgProps };
|
||||
|
||||
QLPreviewRequestSetDataRepresentation(preview, (__bridge CFDataRef)[htmlString dataUsingEncoding: NSUTF8StringEncoding], kUTTypeHTML, (__bridge CFDictionaryRef)props);
|
||||
QLPreviewRequestSetDataRepresentation(preview, (CFDataRef)[htmlString dataUsingEncoding: NSUTF8StringEncoding], kUTTypeHTML, (CFDictionaryRef)props);
|
||||
|
||||
return noErr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user