Changeset 654

Show
Ignore:
Timestamp:
08/03/08 21:19:33 (4 months ago)
Author:
gbooker
Message:

Patch by wazza
Fix cover art for VIDEO_TS dirs.
Fixes #209

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/SapphireFrappliance/SapphireMetaData.m

    r634 r654  
    15591559{ 
    15601560        /*Find cover art for the current file in the "Cover Art" dir */ 
    1561         NSString *subPath = [[self path] stringByDeletingPathExtension]; 
     1561        NSString *subPath = [self path]; 
     1562        if([self fileContainerType] != FILE_CONTAINER_TYPE_VIDEO_TS) 
     1563                subPath = [subPath stringByDeletingPathExtension]; 
     1564 
    15621565        NSString *fileName = [subPath lastPathComponent]; 
    15631566        NSString * myArtPath=nil; 
     1567 
    15641568        if([self fileClass]==FILE_CLASS_TV_SHOW) 
    15651569                myArtPath=[NSString stringWithFormat:@"%@/@TV/%@/%@/%@", 
  • trunk/SapphireFrappliance/SapphireTVShowImporter.m

    r640 r654  
    613613        NSString *imgURL = [info objectForKey:IMG_URL]; 
    614614        NSString *newPath = [previewArtPath stringByAppendingPathComponent:fileName]; 
    615         NSString *imageDestination = [[newPath stringByDeletingPathExtension] stringByAppendingPathExtension:@"jpg"]; 
     615        if( [metaData fileContainerType] != FILE_CONTAINER_TYPE_VIDEO_TS ) 
     616                newPath = [newPath stringByDeletingPathExtension]; 
     617         
     618        NSString *imageDestination = [newPath stringByAppendingPathExtension:@"jpg"]; 
    616619        BOOL isDir = NO; 
    617620        BOOL imageExists = [[NSFileManager defaultManager] fileExistsAtPath:imageDestination isDirectory:&isDir] && !isDir;