Add __str__ to Album and Photo.
This commit is contained in:
parent
ba1fba0c06
commit
28aa47d40d
1 changed files with 9 additions and 0 deletions
|
@ -278,6 +278,12 @@ class Album(ObjectBase, GroupableMixin):
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return f'Album:{self.id}'
|
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
|
@staticmethod
|
||||||
def normalize_description(description):
|
def normalize_description(description):
|
||||||
if description is None:
|
if description is None:
|
||||||
|
@ -715,6 +721,9 @@ class Photo(ObjectBase):
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return f'Photo:{self.id}'
|
return f'Photo:{self.id}'
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return f'Photo:{self.id}:{self.basename}'
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def normalize_override_filename(override_filename):
|
def normalize_override_filename(override_filename):
|
||||||
if override_filename is None:
|
if override_filename is None:
|
||||||
|
|
Loading…
Reference in a new issue