V3 WIP Add ROWS_FROM_ZERO option

This commit is contained in:
Keith Edmunds 2023-10-22 22:51:37 +01:00
parent d81b4c84b8
commit 4903330e44
2 changed files with 5 additions and 1 deletions

View File

@ -87,6 +87,7 @@ class Config(object):
OBS_PORT = 4455
PLAY_SETTLE = 500000
ROOT = os.environ.get('ROOT') or "/home/kae/music"
ROWS_FROM_ZERO = True
IMPORT_DESTINATION = os.path.join(ROOT, "Singles")
SCROLL_TOP_MARGIN = 3
START_GAP_WARNING_THRESHOLD = 500

View File

@ -280,7 +280,10 @@ class PlaylistModel(QAbstractTableModel):
elif section == Col.NOTE.value:
return QVariant(Config.HEADER_NOTE)
else:
return QVariant(str(section + 1))
if Config.ROWS_FROM_ZERO:
return QVariant(str(section))
else:
return QVariant(str(section + 1))
elif role == Qt.ItemDataRole.FontRole:
boldfont = QFont()