Skip to content

Commit

Permalink
code: sortable Songs
Browse files Browse the repository at this point in the history
  • Loading branch information
matiusz committed Jun 18, 2024
1 parent e6fe0a1 commit 2ec13cd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions songbook/src/obj/Song.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ def expandedSections(self):
else:
sections.append(section)
return sections

def __lt__(self, other: Song):
return self.title < other.title

@property
def linkedTitle(self) -> str:
Expand Down

0 comments on commit 2ec13cd

Please sign in to comment.