Ticket #209: video_ts_episode_art.diff

File video_ts_episode_art.diff, 1.6 kB (added by wazza, 5 months ago)
  • SapphireMetaData.m

    old new  
    15581558- (NSString *)coverArtPath 
    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/%@/%@/%@", 
    15661570                                                                                                                        [SapphireMetaData collectionArtPath], 
  • SapphireTVShowImporter.m

    old new  
    612612        /*Check for screen cap locally and on server*/ 
    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; 
    618621        if(imgURL && !imageExists)