Add __str__ to Album and Photo.

master
voussoir 2020-09-27 23:26:33 -07:00
parent ba1fba0c06
commit 28aa47d40d
1 changed files with 9 additions and 0 deletions

View File

@ -278,6 +278,12 @@ class Album(ObjectBase, GroupableMixin):
def __repr__(self):
return f'Album:{self.id}'
def __str__(self):
if self.title:
return f'Album:{self.id}:{self.title}'
else:
return f'Album:{self.id}'
@staticmethod
def normalize_description(description):
if description is None:
@ -715,6 +721,9 @@ class Photo(ObjectBase):
def __repr__(self):
return f'Photo:{self.id}'
def __str__(self):
return f'Photo:{self.id}:{self.basename}'
@staticmethod
def normalize_override_filename(override_filename):
if override_filename is None: