Add full_name to Albums.

This commit is contained in:
voussoir 2020-09-27 23:23:54 -07:00
parent 72229a9c3b
commit ba1fba0c06

View file

@ -429,6 +429,13 @@ class Album(ObjectBase, GroupableMixin):
self.title = title self.title = title
self.description = description self.description = description
@property
def full_name(self):
if self.title:
return f'{self.id} - {self.title}'
else:
return self.id
def get_associated_directories(self): def get_associated_directories(self):
directory_rows = self.photodb.sql_select( directory_rows = self.photodb.sql_select(
'SELECT directory FROM album_associated_directories WHERE albumid == ?', 'SELECT directory FROM album_associated_directories WHERE albumid == ?',