Use the gallery name instead of '.' (ref #89).

This commit is contained in:
Simon Conseil
2014-04-22 23:06:08 +02:00
parent 71626dd234
commit 3b974cbc9e
2 changed files with 6 additions and 4 deletions

View File

@@ -218,7 +218,8 @@ class Album(UnicodeMixin):
medias.sort(key=key, reverse=settings['medias_sort_reverse'])
def __repr__(self):
return "<%s>(%r)" % (self.__class__.__name__, self.path)
return "<%s>(path=%r, title=%r)" % (self.__class__.__name__, self.path,
self.title)
def __unicode__(self):
return (u"{} : ".format(self.path) +
@@ -251,10 +252,11 @@ class Album(UnicodeMixin):
self.description = html
self.meta = md.Meta.copy()
else:
# default: get title from directory name
self.title = os.path.basename(self.path)
self.description = ''
self.meta = {}
# default: get title from directory name
self.title = os.path.basename(self.path if self.path != '.'
else self.src_path)
def create_output_directories(self):
"""Create output directories for thumbnails and original images."""

View File

@@ -93,7 +93,7 @@ class Writer(object):
def generate_context(self, album):
"""Generate the context dict for the given path."""
self.logger.info("Output album : %s", album.dst_path)
self.logger.info("Output album : %r", album)
return {
'album': album,
'index_title': self.index_title,