@property<EOL><INDENT>def thumbnail(self):<DEDENT>
if self._thumbnail:<EOL><INDENT>return self._thumbnail<EOL><DEDENT>thumbnail = self.meta.get('<STR_LIT>', ['<STR_LIT>'])[<NUM_LIT:0>]<EOL>if thumbnail and isfile(join(self.src_path, thumbnail)):<EOL><INDENT>self._thumbnail = url_from_path(join(<EOL>self.name, get_thumb(self.settings, thumbnail)))<EOL>self.logger.debug("<STR_LIT>", self, self._thumbnail)<EOL>return self._thumbnail<EOL><DEDENT>else:<EOL><INDENT>for f in self.medias:<EOL><INDENT>ext = splitext(f.filename)[<NUM_LIT:1>]<EOL>if ext.lower() in self.settings['<STR_LIT>']:<EOL><INDENT>size = f.size<EOL>if size is None:<EOL><INDENT>size = get_size(f.src_path)<EOL><DEDENT>if size['<STR_LIT:width>'] > size['<STR_LIT>']:<EOL><INDENT>self._thumbnail = (url_quote(self.name) + '<STR_LIT:/>' +<EOL>f.thumbnail)<EOL>self.logger.debug(<EOL>"<STR_LIT>",<EOL>self, self._thumbnail)<EOL>return self._thumbnail<EOL><DEDENT><DEDENT><DEDENT>if not self._thumbnail and self.medias:<EOL><INDENT>for media in self.medias:<EOL><INDENT>if media.thumbnail is not None:<EOL><INDENT>self._thumbnail = (url_quote(self.name) + '<STR_LIT:/>' +<EOL>media.thumbnail)<EOL>break<EOL><DEDENT><DEDENT>else:<EOL><INDENT>self.logger.warning("<STR_LIT>", self)<EOL>return None<EOL><DEDENT>self.logger.debug("<STR_LIT>",<EOL>self, self._thumbnail)<EOL>return self._thumbnail<EOL><DEDENT>if not self._thumbnail:<EOL><INDENT>for path, album in self.gallery.get_albums(self.path):<EOL><INDENT>if album.thumbnail:<EOL><INDENT>self._thumbnail = (url_quote(self.name) + '<STR_LIT:/>' +<EOL>album.thumbnail)<EOL>self.logger.debug(<EOL>"<STR_LIT>",<EOL>self, self._thumbnail)<EOL>return self._thumbnail<EOL><DEDENT><DEDENT><DEDENT><DEDENT>self.logger.error('<STR_LIT>', self)<EOL>return None<EOL>
Path to the thumbnail of the album.