From ba1fba0c067b9de7780e46223aca01383fa52010 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sun, 27 Sep 2020 23:23:54 -0700 Subject: [PATCH] Add full_name to Albums. --- etiquette/objects.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/etiquette/objects.py b/etiquette/objects.py index 95ea3f7..109743f 100644 --- a/etiquette/objects.py +++ b/etiquette/objects.py @@ -429,6 +429,13 @@ class Album(ObjectBase, GroupableMixin): self.title = title 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): directory_rows = self.photodb.sql_select( 'SELECT directory FROM album_associated_directories WHERE albumid == ?',