summaryrefslogtreecommitdiff
path: root/src/ui.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui.c')
-rw-r--r--src/ui.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/ui.c b/src/ui.c
index 0d62e6b..0512f36 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -767,16 +767,15 @@ size_t BarUiListSongs (const BarApp_t * const app,
if (filter == NULL ||
(filter != NULL && (BarStrCaseStr (song->artist, filter) != NULL ||
BarStrCaseStr (song->title, filter) != NULL))) {
- const char * const empty = "";
- const char *stationName = "(deleted)";
+ const char * const deleted = "(deleted)", * const empty = "";
+ const char *stationName = empty;
+
const PianoStation_t * const station =
PianoFindStationById (app->ph.stations, song->stationId);
- if (station != NULL) {
- if (station != app->curStation) {
- stationName = station->name;
- } else {
- stationName = empty;
- }
+ if (station != NULL && station != app->curStation) {
+ stationName = station->name;
+ } else if (station == NULL && song->stationId != NULL) {
+ stationName = deleted;
}
char outstr[512], digits[8], duration[8] = "??:??";