mirror of
				https://github.com/janeczku/calibre-web
				synced 2025-11-04 01:03:02 +00:00 
			
		
		
		
	Comic reader: ignore special files originating from Apple devices
This commit is contained in:
		@@ -163,6 +163,14 @@ kthoom.ImageFile = function(file) {
 | 
				
			|||||||
            this.mimeType = undefined;
 | 
					            this.mimeType = undefined;
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // Reset mime type for special files originating from Apple devices
 | 
				
			||||||
 | 
					    // This folder may contain files having image extensions (for example .jpg) but those files are not actual images
 | 
				
			||||||
 | 
					    // Trying to view these files cause corrupted/empty pages in the comic reader and files should be ignored
 | 
				
			||||||
 | 
					    if (this.filename.indexOf("__MACOSX") !== -1) {
 | 
				
			||||||
 | 
					        this.mimeType = undefined;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if ( this.mimeType !== undefined) {
 | 
					    if ( this.mimeType !== undefined) {
 | 
				
			||||||
        this.dataURI = createURLFromArray(file.fileData, this.mimeType);
 | 
					        this.dataURI = createURLFromArray(file.fileData, this.mimeType);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user