From 42b5c2413c717128a64f5f7a3f7815b0830189e6 Mon Sep 17 00:00:00 2001 From: Keith Edmunds Date: Sat, 14 Dec 2024 17:34:46 +0000 Subject: [PATCH] Fix "=" subtotal line --- app/playlistmodel.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/playlistmodel.py b/app/playlistmodel.py index 8eef6a2..9e27a88 100644 --- a/app/playlistmodel.py +++ b/app/playlistmodel.py @@ -1212,6 +1212,8 @@ class PlaylistModel(QAbstractTableModel): Return header text witout markers """ + if header_text == '=': + return "" while header_text.endswith(Config.SECTION_STARTS): header_text = header_text[0:-1] while header_text.endswith(Config.SECTION_ENDINGS): @@ -1263,10 +1265,7 @@ class PlaylistModel(QAbstractTableModel): for row_number in range(rat.row_number - 1, -1, -1): row_rat = self.playlist_rows[row_number] if self.is_header_row(row_number): - if row_rat.note.endswith("-"): - # There was no start of section - return rat.note - if row_rat.note.endswith(("+", "=")): + if row_rat.note.endswith(Config.SECTION_STARTS): # If we are playing this section, also # calculate end time if all tracks are played. end_time_str = ""